zsh-users
 help / color / mirror / code / Atom feed
* Passing parameters between noninteractive shells
@ 2006-10-25  8:31 Wojciech Pietron
  2006-10-25 10:45 ` Phil Pennock
  2006-10-25 14:42 ` Wayne Davison
  0 siblings, 2 replies; 5+ messages in thread
From: Wojciech Pietron @ 2006-10-25  8:31 UTC (permalink / raw)
  To: zsh-users

Hello,

I have access to two version of zsh: /bin/zsh (v. 3.0.6) and $HOME/bin/zsh
(v.4.0.2). /bin/zsh is my login prompt and I am unable to change it.

So I have the following section at the beginning of
my .zshenv:

===============.zshrc================
if [[ $ZSH_VERSION == 3.<->* ]]; then
     if [[ -x $HOME/bin/zsh && -o interactive ]]; then
        exec $HOME/bin/zsh
     else 
       if [[ -x $HOME/bin/zsh && ! -o interactive ]]; then
         exec $HOME/bin/zsh +o interactive
       fi
     fi
fi
#
# A lot of specific ZSH 4.0.2 commands:
# [...] 
===============.zshrc================

With a such a solution switching between v3.0.6 and 4.0.2 passes with no
problem in the interactive sessions.  

The problem is with non-interactive sessions such as remote scp or cvs. This
configuration makes such sessions hang because a new zsh is run and it does not
know what it should do until I send 'exit' command. This is because the
new shell is not given any parameters that had been passed to the
previous instance of the shell - I believe so.

Is there any way to pass parameters of non-interactive sessions to new
instance of zsh? I would also appreciate another workarounds of that
problem. Making the whole .zshrc compatible with 3.0.6 is out of the
question.

Thank you in advance
Wojciech Pietron


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

end of thread, other threads:[~2006-10-25 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-25  8:31 Passing parameters between noninteractive shells Wojciech Pietron
2006-10-25 10:45 ` Phil Pennock
2006-10-25 14:58   ` Bart Schaefer
2006-10-25 15:39     ` Peter Stephenson
2006-10-25 14:42 ` Wayne Davison

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).