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

Re: Alias for a dynamic variable?



Peter Stephenson <pws@xxxxxxx> wrote in news:EXCHANGE03iF5DIz5pF0000bf83
@exchange03.csr.com:

> zzapper wrote:
>> Peter Stephenson <pws@xxxxxxx> wrote in 
news:EXCHANGE03cWo7Z0xK40000be27
>> @exchange03.csr.com:
>> 
>> > alias -g s='$OLDPWD'
>> this works such that I can
>> >cd s
>> but I cant do
>> >cp s/somefile .
> 
> You can already use ~- to refer to the relevant directory.
> 

cp ~-/suk.jpg .

Thanx JWTDO

Dead obvious when you know how!

zzapper



Messages sorted by: Reverse Date, Date, Thread, Author