Personally, I like using abbreviations ("abbr") in fish, which automatically expand as you hit space. This is especially helpful when screen sharing: No more "what does this gcob command do" questions!
Since I'm almost always on my mac, it means they're available in every shell, including remote shells, and in other situations like on Slack or writing documentation.
I mostly use § as a prefix so I don't type them accidentally (although my git shortcuts are all `gg`-consonant which is not likely to appear in real typing).
which gdb /opt/homebrew/bin/gdb
~ type gdb gdb is aliased to `gdb -q'
__git_complete grm _git_rm
grm() {
git rm "${@}"
}
Internally git uses the __git_complete function to set up completions for its subcommands, though this may be specific to your OS/distro and perhaps or git version.This does seem to ship as part of git now, here[1].
[1]: https://github.com/git/git/blob/6a64ac7b014fa2cfa7a69af3c253...
~ ▸ which k
k: aliased to kubectl
`type` is a builtin on both fish and bash though, and does resolve aliases.
[edit] TIL: `zsh` has its own `which`.
Fedora does it. It's very convenient.
makeLinks does most of the work, then sets Homebrew's zsh as the default shell -- this currently runs in bash, so it probably will need to be updated at some point -- and everything gets reloaded.
makeLinks && chsh -s /usr/local/bin/zsh
exec $SHELL && brew doctorWhat?