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

* Re: Even more about my nvi/zsh-bug
  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
  1 sibling, 0 replies; 4+ messages in thread
From: Wayne Davison @ 2004-10-19 19:36 UTC (permalink / raw)
  To: juhtolv; +Cc: zsh-users mailing list, 231851, bostic, skimo

On Tue, Oct 19, 2004 at 10:10:37PM +0300, Juhapekka Tolvanen wrote:
> 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.

That probably means that nvi has modified the $PATH and left out things
like /bin.  So, I assume it is trying to execute "zsh" and that is
failing (due to the PATH).  There might be a way to configure the PATH
to fix this.

I assume you could also avoid the problem by changing your screen setup
to use this:

shell -/bin/zsh

That continues to tell screen to use a login shell, but also ensures
that $SHELL contains a fully qualified program name.

..wayne..


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

* Re: Even more about my nvi/zsh-bug
  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
  1 sibling, 1 reply; 4+ messages in thread
From: DervishD @ 2004-10-20 22:43 UTC (permalink / raw)
  To: juhtolv; +Cc: zsh-users mailing list, 231851, bostic, skimo

    Hi Juhapekka :)

 * Juhapekka Tolvanen <juhtolv@cc.jyu.fi> dixit:
> 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

    Weird, that's '/bin/zsh' in my system. Probably nvi is messing
with $PATH or something like that :?

    Can you tell screen that your shell is '-/bin/zsh' instead of
'-zsh' (or /bin/zsh if you don't need it to be a login shell)?

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/


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

* Re: Even more about my nvi/zsh-bug
  2004-10-20 22:43 ` DervishD
@ 2004-10-20 22:54   ` Juhapekka Tolvanen
  0 siblings, 0 replies; 4+ messages in thread
From: Juhapekka Tolvanen @ 2004-10-20 22:54 UTC (permalink / raw)
  To: DervishD, zsh-users mailing list


DervishD <zsh@dervishd.net> writes:

>  * Juhapekka Tolvanen <juhtolv@cc.jyu.fi> dixit:
>> 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

>     Weird, that's '/bin/zsh' in my system. Probably nvi is messing
> with $PATH or something like that :?

Yes. It seems it does not try to find zsh from those directories
mentioned in PATH .

>     Can you tell screen that your shell is '-/bin/zsh' instead of
> '-zsh' (or /bin/zsh if you don't need it to be a login shell)?

Yes. I actually configured my screen so, as you can see in the end of my
E-Mail. I really got rid of that zsh/nvi-related bug that way.


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