zsh-users
 help / color / mirror / code / Atom feed
* Even more about my nvi/zsh-bug
@ 2004-10-19 19:10 Juhapekka Tolvanen
  2004-10-19 19:36 ` Wayne Davison
  2004-10-20 22:43 ` DervishD
  0 siblings, 2 replies; 4+ messages in thread
From: Juhapekka Tolvanen @ 2004-10-19 19:10 UTC (permalink / raw)
  To: zsh-users mailing list, 231851, bostic, skimo



I am talking about this bug. If nvi is started under screen, it says
this:

/home/juhtolv/.nexrc, 9: Shell expansion failed
/home/juhtolv/.nexrc, 9: Ex command failed: pending commands discarded
Press Enter to continue: 

Here is that line number 9 and comments for it:

" If ~/.nexrc exists, ~/.exrc is not read. So it must be sourced here:
so ~/.exrc

Under screen, this works fine:

SHELL=/bin/sh nvi

But plain nvi command makes that bug appear. But this is strange: I can
use any shell in that environment variable SHELL and nvi still works
fine. Even /bin/zsh is good for it. But look at this:

% echo $SHELL
zsh

As you can see, it says just "zsh", not "bin/zsh". Both these commands
make bug appear:

SHELL=sh nvi
SHELL=zsh nvi

Now, let's see some relevant parts from my ~/.screenrc :

shell -zsh

That means that whenever I hit "Ctrl-a c", it starts zsh and as
login-shell. But as you can see, path is not there, just zsh. And then:

#####################
# Automatic stuff:
#

screen -M -t ROOT 1 su -c 'zsh -l'
screen -M -t ROOT 2 su -c 'zsh -l'

# NICE HACK: Do not start those heavy zsh-shells immediately.
screen    -t zsh   3 ash -c 'fortune 100% debian-hints ; sleep 120 ; exec zsh -l'
screen    -t zsh   4 ash -c 'fortune 100% go ; sleep 180 ; exec zsh -l'
screen    -t zsh   5 ash -c 'sleep 240 ; fortune 100% np-fortune ; exec zsh -l'
screen    -t zsh   6 ash -c 'sleep 300 ; fortune 20% myfortune 80% twisted-quotes ; exec zsh -l'
screen    -t zsh   7 ash -c 'sleep 360 ; exec zsh -l'

screen    -t  zsh 8  ash -c '/home/juhtolv/bin/crm114-handlespamA.sh ; fortune 100% osfortune ; exec zsh -l'

select 1

And as you can see, zsh is there in many places without path. If I
replace every occurrence of "zsh" in that .screenrc with "/bin/zsh", nvi
works just fine under screen. Case closed!

Summa summarum: nvi checks environment variable $SHELL . It tries to use
shell mentioned in that variable, but that environment variable must
have whole path of that shell. I am not very sure, if nvi must be fixed.
Normally $SHELL is defined so that it has whole path of shell, not just
command. I guess Unix-standards like POSIX demand it to be so.

But it might be good idea to add some information about these problems
to its FAQ. I hereby declare this E-Mail message you are reading to be
public domain.


-- 
Juhapekka "naula" Tolvanen * * http colon slash slash iki dot fi slash juhtolv
"kummaan paikkaan itsesi karkotit, syyttä syyllisten seuduille. raskaisiin
taloihin pesit, kirkuviin huoneisiin. mitä ne sinulle tekevät siellä? kuka on
raapinut nimesi pois, nimesi, kasvosi, mielesi oivat palvelemaan konetta?" CMX


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

end of thread, other threads:[~2004-10-20 22:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19 19:10 Even more about my nvi/zsh-bug Juhapekka Tolvanen
2004-10-19 19:36 ` Wayne Davison
2004-10-20 22:43 ` DervishD
2004-10-20 22:54   ` Juhapekka Tolvanen

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