unhist () {
alias $1=" $1"
}
unhist unhist
unhist fzf
unhist rghist #custom command that greps .zhistory,... foo |
bar |
baz
You don't have to use backquotes, AND, it allows you to comment line by line, because there's no backslash messing with the parser. #!/bin/sh
$*
that's my `~/bin/noglob` file, so when I call a zsh script from bash that uses `noglob`, it doesn't blow up.
Using brackets like this is something I never thought of, and it's probably why it's hard for me to process it, but I can see it provides nice annotation capabilities, and it's a more self-contained style.
Thx for sharing!