Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Is there a kind of function factory in zsh?
- X-seq: zsh-users 15106
- From: Leander Jedamus <ljedamus@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Is there a kind of function factory in zsh?
- Date: Tue, 08 Jun 2010 17:26:38 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=jGFEFhFX1VS328svAA6gpyW50wJ28oD3e17B7lP4PRI=; b=bRhP1ZCWonv2cPykRWnRrEGsF45xVEarfhhCN3EUuKIjZ32q2KE67scewIGH8MLOQp w09QD6q4xbpP3lQLVooxCkH21a6XzISjC9nbHmBSzpfom8zLPSq9lnJLL3WUsB69Vvkb EF/yTJ07ScDpPltSj/5O6Mpu2+X6xIvHvdZMY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=DQZH64XLUgPMHPut2YO3xpwpb/6FWIjN3azwuFdWPjwfibF21rFEEIEztn2ERHOGDU cl67I7guSekqJMZ/QKk5OkCH2zLeMZRE8IC+kW8FXk+YsJ+3Z6yGSmQztJO1att4rz6B OyVt6O+/pXaJAoQ3ObYFtR/ItzPe//3X39UtQ=
- 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
Hi!
I wonder if I could use a pattern for creating fucntions, that nearly
look the same.
Background is I have to write a function for ssh, telnet, su, bash, zsh,
tcsh and so on that all look like (for example for the ssh command):
ssh()
{
set_title "ssh $@"
{
command ssh "$@"
} always {
cd .
}
};# ssh()
How can I avoid writing all that code again and again?
Thanks in advance
Leander Jedamus
Messages sorted by:
Reverse Date,
Date,
Thread,
Author