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

Re: Weird behaviour with exporting PATH



On Sun, Nov 05, 2006 at 01:12:08PM +0100, Frank Terbeck wrote:
> Stephan Windmüller <windy@xxxxxxxxxxxxx>:
> > On Sun, 05. Nov 2006, Stephane Chazelas wrote:
> > 
> > > PATH should be defined in your .profile as it's a setting for your
> > > session, not for your shell only.
> > 
> > This file is not processed on my system. Do I have to source it
> > manually?
> 
> Stephane probably meant '.zprofile', see
> <http://zsh.dotsrc.org/Doc/Release/zsh_4.html#SEC17>.
> To wipe out duplicates from $PATH you could also issue this command:
> % typeset -U path

Actually, I thought .profile was read if .zprofile was not
there.

I would suggest to do a

ln -s .profile ~/.zprofile

and keep the syntax of .profile portable so that your session
settings are preserved ifever you decide to change your login
shell to another Bourne like shell.

> [...]
> > > Adding:
> > > bindkey -e 
> > > to your ~/.zshrc should force the emacs mode.
> > 
> > Thank you, that helped. But is there a "vim"-mode instead of vi? I did
> > not find it in the documentation.
> 
> Nope, there is no 'vim' Mode.
> See <http://zsh.dotsrc.org/Doc/Release/zsh_17.html#SEC92>.
[...]

It should be noted that zsh doesn't call vi nor any shared
library common to vi. The vi mode is a vi-like mode, it doesn't
implement the full vi interface only a subset of the insert and
command mode (no ex mode) with additions.

Given that vim is a superset of vi, zsh vi-mode could also be
called vim-mode, as it also implements a subset of the vim
interface.

And if there are features from vim you are missing in zsh vi
mode, it's quite easy to extend it.

For instance, if the <End> key doesn't work for you, you can
probably do something like:

bindkey $terminfo[kend]  end-of-line

(if it worked for you in emacs mode, it's probably that you have
that line (or similar) already in one of your startup files, but
that it was applied only to the emacs keymap).

-- 
Stéphane



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