Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: duplicating functions



You can define multiple function names having the same function body
with a single "function" command (or with a single pair of empty
parens, if you're using the other syntax).  This is one of the reasons
that the alias/function conflict is so insidious; if you have

    alias foo='noglob bar'
    foo() { print oops }

you get two functions that print oops, one of which supercedes the
noglob modifier, and neither of which is named foo.

However, in a case like yours, that quirk is potentially useful:

    function g{0..9} { gmark $0 $* }



Messages sorted by: Reverse Date, Date, Thread, Author