Alias as abbreviation instead? #2936
khuongduybui
started this conversation in
Ideas
Replies: 1 comment
-
Agreed. It would be nice to have such a feature. Currently we do not. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have fallen in love with fish shell's abbreviation approach for aliasing.
The main reason is simply illustrated like this:
Most of the time I would run
ls
command withls -la
options.So I
alias
it to simplyl
=>l = ls -la
.Now with
nu
0.25.x approach to alias, in some cases where I want to runls -lad
instead, I can still invoke it withl -d
.However, in the super rare cases where I want to run
ls -l
(without-a
), I cannot usel
at all.With fish shell abbreviation approach, when I type
l<space>
, the command is replaced withls -la<space>
, so I can conveniently edit the command with both additions and deletions.Of course the example above does not make sense in practice, because it would be faster to simply type
ls -l
instead ofl<space><backspace><backspace>
.However, please imagine a very very long alias where sometimes it makes sense to edit a tiny bit in the middle of the command, not at the end.
Beta Was this translation helpful? Give feedback.
All reactions