Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: persistant Directory history?
- X-seq: zsh-users 10951
- From: "William Scott" <wgscott@xxxxxxxxxxxxxxxxxx>
- To: "William Scott" <wgscott@xxxxxxxxxxxxxxxxxx>, "chesss" <testingagain@xxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: persistant Directory history?
- Date: Tue, 7 Nov 2006 06:22:15 -0800 (PST)
- Importance: Normal
- In-reply-to: <20061107081800.GA4420@sc>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <5db995410611060845y53f673e6je029a9c60659f116@xxxxxxxxxxxxxx> <20061106174053.GA4323@sc> <5db995410611061314l26e089b8wb214da46064c8235@xxxxxxxxxxxxxx> <20061106215051.GB4323@sc> <Pine.OSX.4.61.0611061617370.1112@xxxxxxxxxxxxxxx> <20061107081800.GA4420@sc>
>> Sorry to hijack, but is there a simple way to have a shared directory
>> stack between several terminal sessions? I hacked together something
>> that
>> works, but I have a bad feeling that I reinvented the wheel (and never
>> quite made it round).
> [...]
>
> Maybe something like:
>
> SAVED_DIRSTACK=~/.zsh-dir-stack-shared
> get_saved_dirstack() {
> [[ -r $SAVED_DIRSTACK ]] &&
> . $SAVED_DIRSTACK
> }
> save_dirstack() {
> print -r "dirstack=(${(@qq)dirstack})" > $SAVED_DIRSTACK
> }
>
> functions[preexec]+='
> get_saved_dirstack'
> functions[chpwd]+='
> save_dirstack'
>
> (untested).
>
> --
> Stéphane
>
Thanks. That is similar enough to what I have to not make me feel like a
complete fool, but much more simple and elegant.
Bill
I'd show what I have but the server just kicked the bucket.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author