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

Re: environment settings



On 2008-06-16 at 09:46 +0200, Marcus Franke wrote:
> Ive got a strange problem with my zsh.
> 
> I installed wyrd (calender application) and had problems with wyrd not
> recognizing my EDITOR settings. Strangely looking into "set" and "env"
> it was present in just one and not both.

Presumably it was in 'set', the variables known to zsh, and not 'env',
an external command which checks which variables are in the environment
(a list of strings exported to child processes).

It should be sufficient to just "export EDITOR".

> Now I defined EDITOR in my .zshenv and things are getting even worse :)
> 
> I use to press a lot of ctrl+a or ctrl+e to jump to start or end of my
> shell prompt, stopped working. ctrl+r for incremental search stopped
> working, too.

You're using vi or some derivative and zsh has seen this and
automatically switched key-bindings to vi keybindings.  You want
"bindkey -e" to force Emacs key-bindings, despite using vi as a
text-editor.

Further, you want to set both EDITOR and "bindkey -e" in ~/.zshrc, *not*
in ~/.zshenv; note that .zshenv is for _all_ shells, including
non-interactive cron-jobs, etc.  .zshrc is for interactive shells.  You
(hopefully) only care about editors and ZLE input modes in interactive
shells.  :-)

-Phil



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