Re:Sd: My Script Directory
by smichel17 on Monday March 15, 2021 @08:31PM
(#26471385)
I don't actually use that but the point stands -- If the script is simple enough, you don't need a --help; comments in the source work just as well.
[ Parent
| on HN ]
zsh has `= expansion`:
> If a word begins with an unquoted `=' and the EQUALS option is set, the remainder of the word is taken as the name of a command. If a command exists by that name, the word is replaced by the full pathname of the command.
To edit the source of `myscript` I can then use
vim =myscript
Re:Sd: My Script Directory
by ianthehenry on Monday March 15, 2021 @09:26PM
(#26471786)
That's really neat! I'd never heard of that. I think you just saved my future self many many keystrokes.