X-Git-Url: https://git.madduck.net/etc/zsh.git/blobdiff_plain/6a5f3187cb8cc0d7d3463ff97dddd415642c95b9..32ea2277195ebd8c244f37285f64b135e6ba4d9e:/.zsh/zshrc/82-load_alias-d diff --git a/.zsh/zshrc/82-load_alias-d b/.zsh/zshrc/82-load_alias-d index 62e6e39..29880a9 100644 --- a/.zsh/zshrc/82-load_alias-d +++ b/.zsh/zshrc/82-load_alias-d @@ -12,9 +12,11 @@ function make_alias { setopt extendedglob local fn="${1:t}" s for l in ${(f)"$(<$1)"}; do + 0=$fn case "$s/$l" in (*/\#*) continue;; - (/*) eval "alias $fn='${l//\$0/$fn}'"; s=s; 0=$fn;; + (/\(\)*) eval "function $fn$l"; s=s;; + (/*) eval "alias $fn='${l//\$0/$fn}'"; s=s;; (s/(#b)(*)) eval "$match[1]";; esac done