Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: trap signal with functional scope?
- X-seq: zsh-users 13190
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: trap signal with functional scope?
- Date: Fri, 05 Sep 2008 14:08:36 +0100
- In-reply-to: <DF6DC551-8F38-4015-AA18-755B59DEA01F@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <DF6DC551-8F38-4015-AA18-755B59DEA01F@xxxxxxxxxxx>
Sebastian Stark wrote:
>
> I have the following zsh function:
>
> ssh () {
> set_screen_title ${*##-*}
> command ssh "$@"
> set_screen_title "${HOST/.*}"
> }
>
> Most of the time this just works and is cool. It fails when I send
> ctrl-c to the ssh process.
With a suitably recent version of zsh (4.3.something), the fix is
ssh () {
set_screen_title ${*##-*}
{
command ssh "$@"
} always {
set_screen_title "${HOST/.*}"
}
}
Without a suitably recent version of zsh, the answer is probably to
upgrade.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author