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

Re: Aliases with spaces?



On Mar 1, 10:45am, Matthias Teege wrote:
> 
> is it possible to define a alias like "foo -r"=programm?

It's possible to define it, but it won't do anything useful.

To accomplish what you probably mean, you'd need something like:

    foo() {
      case $1 in (-r) shift; programm $*;; (*) command foo $*;; esac
    }



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