I use bog-standard zsh without any plugins or any of the fancy stuff, but one of the most useful tricks I use is to leverage interactive comments. If I have a long command I know I run will frequently, I 'tag' them at the end by a shell comment[1].
So for example, I have one that I use to run software updates:
softwareupdate --include-config-data --install --all --restart # system:update:restart
I have a similar one without the `--restart` option that I tag with `:norestart` instead, but you get the idea—I put related commands under a common term.Then I can just use the ctrl-r builtin keybinding, type `:system` and cycle through system related commands, or go exactly to the command I want. The beauty of this is that it also works in bash and systems I remote into (which I frequently need to do at work), without any extra plugins required.
[1]: interactive comments are disabled by default in zsh, but can be enabled with `setopt interactive_comments`
Interesting approach. Im so lazy I would just create a alias with the commands initials so "sur" but I guess that can get confusing if there are too many.
For sure. Personally, I avoid shortened aliases like that. I regularly need to use barebones systems so I wouldn't like something like "ll" (`ls -l`) or "gst" (`git status`) becoming muscle memory. Most of my aliases I do define are proper english words.