Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Alias for a dynamic variable?



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