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

Re: from tcsh to zsh (alias)



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