From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27181 invoked by alias); 8 Jun 2010 11:26:36 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15105 Received: (qmail 22339 invoked from network); 8 Jun 2010 11:26:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00, RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_SORBS_WEB autolearn=no version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at biskalar.de does not designate permitted sender hosts) Subject: Re: from tcsh to zsh (alias) Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii From: Sebastian Stark In-Reply-To: <4C0E1EC5.607@googlemail.com> Date: Tue, 8 Jun 2010 13:04:04 +0200 Cc: zsh-users@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <4C0E1A48.3010700@googlemail.com> <20100608113236.5b6efc81@csr.com> <4C0E1EC5.607@googlemail.com> To: Leander Jedamus X-Mailer: Apple Mail (2.1078) 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/.*} } }