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

Re: from tcsh to zsh (alias)



On Tue, 08 Jun 2010 12:24:08 +0200
Leander Jedamus <ljedamus@xxxxxxxxxxxxxx> wrote:
> alias ssh="ssh $* ; cd ."
> doesn't work as extpected.

This needs to be a function since aliases don't take arguments (because
functions are generally more powerful and replace many uses of aliases):

ssh() {
   ssh "$@"
   cd .
}

See http://zsh.sourceforge.net/FAQ/zshfaq02.html#l12

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



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