[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: export PWD

From: Wilhelm Mueller
Subject: Re: export PWD
Date: 04 Jul 2002 10:26:15 +0200

    Jörg>   alias mycd='cd $(yyy $@)'

Aliases are just short cuts for simple commands and not very useful
besides for simple things like alias ll='ls -l'.  They simply don't
take arguments.

Shell functions are usually what you want--and much more powerful
than csh style aliases with arguments, though maybe not in your case.

    Jörg>   alias mycd='cd `yyy '
    Jörg> now it works with
    Jörg>   mycd gcc`

Now, that's really ugly!  Is there an obfuscated shell code contest
going on somewhere?

mycd () { cd "$(yyy "$@")"; }

is probably what you're looking for.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]