-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
A:aliasIssues around support for command aliases, touches parser and name resolutionIssues around support for command aliases, touches parser and name resolutionA:line-editorIssues related to reedlineIssues related to reedlinecategory:enhancementNew feature or requestNew feature or requestdelightthis feature would delight usersthis feature would delight users
Description
Describe the solution you'd like
Fish shell has a feature/command I really like called abbr.
abbr works very similar to an alias in practice, except that when invoked it expands it's text to the full version.
Example behavior:
User enters abbr gc = git checkout to register the abbreviation "gc". From now on, when the user types "gc " (the space is important) the text "gc" is replaced with "git checkout" and the user can continue typing as normal.
I would love to see something similar in Nushell.
Describe alternatives you've considered
Functionally, this is not so different from alias, but I'd say it is objectively superior for a few reasons:
- Expanded text makes it very clear what will be run - aliases can be ambiguous
- Expanded text reinforces the real version of commands (which can be useful if/when you don't have your normal shell/aliases for any reason) - aliases only reinforce a command that is not portable
- You can edit the expanded text if needed before running it - not possible with an alias
Additional context and details
No response
NotTheDr01ds, amstaniec, buster-blue, mo8it, m0lentum and 47 morekgadek, fingerblaster, 239, arthsmn, jeanlucthumm and 3 more
Metadata
Metadata
Assignees
Labels
A:aliasIssues around support for command aliases, touches parser and name resolutionIssues around support for command aliases, touches parser and name resolutionA:line-editorIssues related to reedlineIssues related to reedlinecategory:enhancementNew feature or requestNew feature or requestdelightthis feature would delight usersthis feature would delight users