Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Interpret Parameter Value at Time of Function Definition
- X-seq: zsh-users 22862
- From: Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Interpret Parameter Value at Time of Function Definition
- Date: Tue, 5 Sep 2017 09:47:58 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=xrbs10GX3iUXkgOfSEO8DOJzTifiuv3bFldCI4ZmA4g=; b=jQj4XprtUptHD9XPbX2D07ntb2u93AzF3YCn9/bZ3s5Sx61T17zXz6oiNtTv9QGi0g RCMOkXKlwc9C4iWOJwGSNk1UGfKrMv+MwRWL+6C+2XPHD2Kq0q8DnCQPCmAzZq3rbv/K mLUrXPkDzppyTOVmWYHFyiiZgM7DGKaXNc4iIM38wftTMo9x0L/VHU5vuOFc8e33t2eW 7s2qRz+Yg7S/OSbwuMcQa3fdCNb5F2V0OR3L1klIBZVS9MkaRj9aXkZDqYDJUV2zoLrR 3txZdh1/quaqYXNIXl7qY2GphPL6b5Qc4IbaXnwvBpFL73Xsp2Z269C+YOmaWwxWalw1 ug4Q==
- 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
- Sender: ethersoft@xxxxxxxxx
I think zsh interprets the value of a shell variable when a function is
run, but I would like to set the value when the function is read.
E.g:
$ aaa=bbb
$ function t {
print aaa = \"$aaa\"
}
$ t
aaa = "bbb"
$ aaa=ccc t
aaa = "ccc"
I would like to interpret $aaa at read time, so that:
aaa=ccc t
would print:
aaa = "bbb"
How do I do that?
Thanks,
Vin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author