feat: fish-style abbreviations#18197
Conversation
|
Hey, just a bot checking in! You edited files related to the configuration. |
|
Thanks @casedami. I'm not sure this is how we want it to work exactly. Added a conversation on Discord https://discord.com/channels/601130461678272522/615329862395101194/1504176644804579409 How should this feature work?
|
|
After yesterday's team meeting we decided on 3 things regarding this PR.
If we can get the CI green and make sure these items are followed, we can land this PR. |
|
Ok sounds good, I'll start working on that |
|
waiting on nushell/reedline#1074 tried my hand at this, not sure what y'all think of it. currently also havent tested it yet until im able to update reedline with the linked pr |
|
LGTM at first glance, thanks! I'm not sure what you mean by BTW I assume the highlighting given the same input always happens before the string literal check. If not the case, we might need to do some adjustments. |
|
By backout early i meant a way to somehow use the cache inside as far as i understand, the highlighting always happens before the string literal check |
landed! |
|
One note: expansion still occurs inside a string literal for FlatShape::ExternalArg, for example $env.config.abbreviations = { gs: "git status" }
bash -c "echo gs ..." # gs would expand herethis seems like something that would be maybe unexpected for a user? i could add another check within |
Ya, seems appropriate to do that. I agree that would be surprising and we should eliminate that if we can. |
|
Last thing, i had originally added support for |
|
I'm fine either way. In one respect it's more discoverable because you can do |
|
Assuming this make CI go green, should be all set unless there are any other concerns/comments |
|
I wonder if it's a problem that if you have an abbreviation like |
|
thats probably more intuitive i agree, to do that would be a simple change to reedline. i can submit a PR for that |
|
ok, i landed your reedline pr this morning. is there things to implement here too or just update the reedline commit in cargo.toml? |
|
Just need to update reedline, I can do it in the next hour or so but if you'd rather get it done then feel free |
|
ok, i'll do it. i have a couple other things i want to change too. |
|
Thanks for all of this! |
|
Thanks for your help and feedback! |
Description
Adds support for fish-style abbreviations that are expanded on
enterorspace. Add them to your config like so:User-facing changes (Release notes)
Added support for fish-style abbreviations that are expanded on
enterorspace. Abbreviations are syntax-aware in that expansion doesn't occur within strings or when appearing as arguments to an external program.Abbreviations can be added to the config like so:
Also added
abbrandabbr listcommands to help make this functionality more discoverable.Additional notes
supports this reedline feature nushell/reedline#1060