Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Weird behaviour with exporting PATH



On Sun, Nov 05, 2006 at 11:19:20AM +0100, Stephan Windmüller wrote:
> Hello!
> 
> I am using zsh 4.3.2 from the debian backports and figured out some
> strange behaviour when starting a zsh inside another zsh.
> 
> Line from .zshrc:
> 
> export PATH=$PATH:/home/user/path
> 
> Of course, at the first start all works fine. But when I start another
> zsh and /home/user/path is listed twice in $PATH, my shell is acting
> weird.

PATH should be defined in your .profile as it's a setting for
your session, not for your shell only.

> For example, pressing "Cursor up" calls the last history entry but
> points the cursor at the first character (expected: after the last).
> Pressing "<END>" then results in changing the first word to capital
> letters.
> 
> What is going on here? And how do I fix it?
[...]

That indicates you are in vi mode. It shouldn't be related to
$PATH. What is possible is that you have a bindkey -e (for
switching to emacs mode) in .profile, .zprofile, .zlogin,
/etc/profile, /etc/zprofile or /etc/zlogin instead of .zshrc
(here, it's a shell setting).

Adding:

bindkey -e 

to your ~/.zshrc should force the emacs mode. zsh may have
chosen vi mode by default because you have the $VISUAL or
$EDITOR variable set to vi.

-- 
Stéphane



Messages sorted by: Reverse Date, Date, Thread, Author