This should be considered more of a “Hey, did you know about…?” than a pull request.
Fish has an abbr command that lets you replace one string, when used as a command, with another. (The substitution can be shorter than the original, e.g. yarn in place of yearn, so abbr can be a bit of a misnomer.)
The principal difference between an abbr and an alias is that the abbr substitution happens as you type, which I happen to find kind of neat. More practically, it means that you don't have to search your command history for all possible variations of its name. I don't have to go digging for all instances of gitandgti when trying to recall something I did recently, because the latter were transformed to git before I hit return.
Hope you find this edifying and/or useful. Thanks for sharing all of your dotfiles!
This should be considered more of a “Hey, did you know about…?” than a pull request.
Fish has an
abbr
command that lets you replace one string, when used as a command, with another. (The substitution can be shorter than the original, e.g.yarn
in place ofyearn
, soabbr
can be a bit of a misnomer.)https://fishshell.com/docs/current/commands.html#abbr
The principal difference between an
abbr
and analias
is that theabbr
substitution happens as you type, which I happen to find kind of neat. More practically, it means that you don't have to search your command history for all possible variations of its name. I don't have to go digging for all instances ofgit
andgti
when trying to recall something I did recently, because the latter were transformed togit
before I hit return.Hope you find this edifying and/or useful. Thanks for sharing all of your dotfiles!