Another great advantage of fish abbreviations is your history shows the actual command that was run (and in fact as soon as you've typed it, it expands, so you SEE what you're running).
Yes, essentially on the fly editable aliases. Fish is so good. I assume there's a zsh plugin that mimics that functionality - zsh people should try it.
I like putting my "aliases" into the functions directory of my config.
I have one that uses podman if it's available when I type `docker`. If I ever specifically need Docker I can use the fully-qualified path. I have a similar trick for `nvim`/`vim`.
This is the right way. I mentioned in another comment, but abbreviations also shine when screen sharing: Everyone can follow along quickly without having to ask the "what does this gcob command do" questions.
Yeah, it's very convenient. Here are a few of mine(tested on OS X):
alias -g L="| less"
alias -g T="| tee"
alias -g C="| pbcopy"
alias -g @all="> /dev/null 2>&1"
if command -v rg > /dev/null; then
alias -g G="| rg"
else
alias -g G="| grep"
fi
dmd|1 year ago
jacobsenscott|1 year ago
mattgreenrocks|1 year ago
I have one that uses podman if it's available when I type `docker`. If I ever specifically need Docker I can use the fully-qualified path. I have a similar trick for `nvim`/`vim`.
watusername|1 year ago
sisk|1 year ago
alkh|1 year ago