Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: from tcsh to zsh (alias)
- X-seq: zsh-users 15105
- From: Sebastian Stark <seb-zsh@xxxxxxxxxxx>
- To: Leander Jedamus <ljedamus@xxxxxxxxxxxxxx>
- Subject: Re: from tcsh to zsh (alias)
- Date: Tue, 8 Jun 2010 13:04:04 +0200
- Cc: zsh-users@xxxxxxx
- In-reply-to: <4C0E1EC5.607@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
- References: <4C0E1A48.3010700@xxxxxxxxxxxxxx> <20100608113236.5b6efc81@xxxxxxx> <4C0E1EC5.607@xxxxxxxxxxxxxx>
Am 08.06.2010 um 12:43 schrieb Leander Jedamus:
> Am 08.06.2010 12:32, schrieb Peter Stephenson:
>> ssh "$@"
> Now it says:
> ssh:2: maximum nested function level reached
> How can I prevent loops? Ah, I read some further:
> ssh() {
> command ssh "$@"
> cd .
> }
A function like this even works in case of failure of the ssh command as well as when ssh is still trying to connect:
ssh () {
set_title ${*##-*}
{
command ssh "$@"
} always {
set_title ${HOST/.*}
}
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author