0

I wonder if this is only my case that when I use less 458 (POSIX regular expressions), ~/.zshenv is read.

Because I use pyenv and python is in a directory of pyenv (PATH is set in ~/.zshrc), less does not work. The error message is 'no python is available.'.

If I explicitly set, at the top of .zshenv, PATH=/usr/bin:$PATH, then less works.

Could you explain what is going on...

xhienne
  • 5,738
  • 1
  • 15
  • 34
kensuke1984
  • 949
  • 1
  • 11
  • 21
  • Could you post the output of `echo $PATH` before modifying it? – Harald Nordgren Jan 20 '17 at 18:42
  • Thank you /home/kensuke/.pyenv/shims:/home/kensuke/.pyenv/bin:/home/kensuke/anaconda3/bin:/usr/local/openmpi/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/sac/bin:/usr/local/texlive/2016/bin/x86_64-linux:/usr/local/evalresp/bin:/usr/local/TauP-2.3.0/bin:/usr/local/netcdf/bin:/home/kensuke/bin:/home/kensuke/.Kibrary/bin .pyenv seems to be a reason. – kensuke1984 Jan 24 '17 at 05:02
  • And result of 'which less'? You could add it to the question as that is easier to read. I believe that there is a program in one of the directories before '/usr/bin' in PATH also called 'less'. – Harald Nordgren Jan 24 '17 at 08:25
  • which less > /usr/bin/less and if I use it, I have the same error.... – kensuke1984 Jan 25 '17 at 07:55
  • if less doesnt read .zshenv file, it works.... – kensuke1984 Jan 25 '17 at 08:00
  • So I assume that 'which less' gives different results with and without reading .zenv? Post the contents of '.zenv'. – Harald Nordgren Jan 25 '17 at 08:24

0 Answers0