Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Alias for a dynamic variable?
- X-seq: zsh-users 10190
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Alias for a dynamic variable?
- Date: Thu, 27 Apr 2006 17:10:59 +0100
- In-reply-to: <Xns97B2AD9E7A62zzappergmailcom@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <Xns97B2AD9E7A62zzappergmailcom@xxxxxxxxxxx>
zzapper wrote:
> Hi
> How can I have a (Global) alias for a dynamic variable such as $OLDPWD
Not sure I understand the question, but you can have a global alias by
having a global alias... here's one with $SECONDS...
% alias -g s='$SECONDS'
% echo s
184291.9458320000
% echo s
184293.7045900000
% echo s
184294.6965270000
(I have "typeset -F SECONDS" in my .zshrc.)
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php
Messages sorted by:
Reverse Date,
Date,
Thread,
Author