Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
creating user defined special parameters?
- X-seq: zsh-users 15701
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: creating user defined special parameters?
- Date: Sun, 9 Jan 2011 01:38:36 +1300 (NZDT)
- 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
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
is there a way, from within the shell, to create a special parameter?
in other words; is there a way to create a variable that refers to a
function, and execute the function when the variable is used?
eg...
date_func () { date }
typeset [options] date date_func
so that:
echo $date
would return the _current_ date & time?
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"No two men are alike, and both of them are happy for it."
-- Morris Mandel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author