Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: from tcsh to zsh (alias)
- X-seq: zsh-users 15102
- From: Peter Stephenson <Peter.Stephenson@xxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: from tcsh to zsh (alias)
- Date: Tue, 8 Jun 2010 11:32:36 +0100
- In-reply-to: <4C0E1A48.3010700@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- Organization: Cambridge Silicon Radio
- References: <4C0E1A48.3010700@xxxxxxxxxxxxxx>
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