zsh-workers
 help / color / mirror / code / Atom feed
* Re: shared directory stack?
       [not found] <069D3A69-0BEE-4AA6-AB2E-8CA792D87825__24287.7120305367$1185771313$gmane$org@chemistry.ucsc.edu>
  2007-08-17 11:40 ` shared directory stack? Stefan Reichör
@ 2007-08-17 11:40 ` Stefan Reichör
  2007-08-17 12:00   ` Peter Stephenson
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Reichör @ 2007-08-17 11:40 UTC (permalink / raw)
  To: zsh-workers

Hi William!

> Hi folks:
>
> Is there a way to have a shared directory stack among a bunch of
> shell sessions, in a way analogous to shared history in zsh?
>
> I have implemented something hackish, and have been using it with
> success for awhile, but I worry that there is a simple, elegant way
> in zsh, since there is for almost everything else hackish that I have
> implemented.

Could you please post your solution?

Thanks,
  Stefan.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: shared directory stack?
  2007-08-17 11:40 ` Stefan Reichör
@ 2007-08-17 12:00   ` Peter Stephenson
  2007-08-17 15:03     ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Stephenson @ 2007-08-17 12:00 UTC (permalink / raw)
  To: zsh-workers

On Fri, 17 Aug 2007 13:40:39 +0200
Stefan Reichör <stefan@xsteve.at> wrote:
> > Is there a way to have a shared directory stack among a bunch of
> > shell sessions, in a way analogous to shared history in zsh?
> 
> Could you please post your solution?

Although I haven't followed them in great detail, there have been
previous discussions about ways of saving and restoring the directory
stack between (consecutive rather than concurrent) sessions which
would be a starting point.

This sort of question comes up often enough it would be a good
idea to have some suitable code bundled with the shell.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: shared directory stack?
  2007-08-17 12:00   ` Peter Stephenson
@ 2007-08-17 15:03     ` Bart Schaefer
  2007-08-17 17:17       ` Peter Stephenson
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2007-08-17 15:03 UTC (permalink / raw)
  To: zsh-workers

On Aug 17,  1:00pm, Peter Stephenson wrote:
}
} On Fri, 17 Aug 2007 13:40:39 +0200
} Stefan Reichör <stefan@xsteve.at> wrote:
} > > Is there a way to have a shared directory stack among a bunch of
} > > shell sessions, in a way analogous to shared history in zsh?
} 
} This sort of question comes up often enough it would be a good
} idea to have some suitable code bundled with the shell.

The tricky bit about this one is that a change of directory in one
shell has to trigger a change of directory in all the other shells.
Aside from the problem of having those shells execute commands in the
idle space between prompts (or worse, while some external command is
still running), I can't figure out when (or why) it would be a good
idea to have this happen.

A variant of "cd" and/or "pushd" that says "put this shell in the same
directory stack as that one" (where maybe "that one" just means "the
latest shell to have executed a pushd/popd") would seem to me to make
more sense than something that automatically syncs ala SHARE_HISTORY.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: shared directory stack?
  2007-08-17 15:03     ` Bart Schaefer
@ 2007-08-17 17:17       ` Peter Stephenson
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Stephenson @ 2007-08-17 17:17 UTC (permalink / raw)
  To: zsh-workers

Bart Schaefer wrote:
> A variant of "cd" and/or "pushd" that says "put this shell in the same
> directory stack as that one" (where maybe "that one" just means "the
> latest shell to have executed a pushd/popd") would seem to me to make
> more sense than something that automatically syncs ala SHARE_HISTORY.

Yes, I was certainly thinking of some minimally invasive function
based approach which redefines builtins to read from or write to
files.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: shared directory stack?
       [not found] <069D3A69-0BEE-4AA6-AB2E-8CA792D87825__24287.7120305367$1185771313$gmane$org@chemistry.ucsc.edu>
@ 2007-08-17 11:40 ` Stefan Reichör
  2007-08-17 11:40 ` Stefan Reichör
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Reichör @ 2007-08-17 11:40 UTC (permalink / raw)
  To: zsh-workers

Hi William!

> Hi folks:
>
> Is there a way to have a shared directory stack among a bunch of
> shell sessions, in a way analogous to shared history in zsh?
>
> I have implemented something hackish, and have been using it with
> success for awhile, but I worry that there is a simple, elegant way
> in zsh, since there is for almost everything else hackish that I have
> implemented.

Could you please post your solution?

Thanks,
  Stefan.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-08-17 17:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <069D3A69-0BEE-4AA6-AB2E-8CA792D87825__24287.7120305367$1185771313$gmane$org@chemistry.ucsc.edu>
2007-08-17 11:40 ` shared directory stack? Stefan Reichör
2007-08-17 11:40 ` Stefan Reichör
2007-08-17 12:00   ` Peter Stephenson
2007-08-17 15:03     ` Bart Schaefer
2007-08-17 17:17       ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).