sorin-ionescu / prezto

The configuration framework for Zsh
MIT License
14k stars 4.49k forks source link

$path from .zshenv is not sourced in tmux #502

Closed Fl4t closed 10 years ago

Fl4t commented 10 years ago

Maybe I'm mess something here...

~ ❯❯❯ print -l $path
/home/warez/.gem/ruby/2.0.0/bin
/usr/lib/ruby/gems/2.0.0/bin
/usr/local/bin
/usr/local/sbin
/usr/bin
/usr/bin/vendor_perl
/usr/bin/core_perl
~ ❯❯❯ tmux
~ ❯❯❯ print -l $path
/usr/local/sbin
/usr/local/bin
/usr/bin
/usr/bin/vendor_perl
/usr/bin/core_perl

This is my $path :

# Set the list of directories that Zsh searches for programs.
path=(
  /home/warez/.gem/ruby/2.0.0/bin
  /usr/lib/ruby/gems/2.0.0/bin
  /usr/local/{bin,sbin}
  $path
)

And my module order (where is the good module order btw ?) :

# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
  'environment' \
  'archive' \
  'git' \
  'history-substring-search' \
  'syntax-highlighting' \
  'history' \
  'terminal' \
  'editor' \
  'directory' \
  'spectrum' \
  'utility' \
  'completion' \
  'fasd' \
  'pacman' \
  'rsync' \
  'tmux' \
  'ssh' \
  'prompt'
sorin-ionescu commented 10 years ago

I don't know what's modifying the path.

Check my dotfiles for a good module order. Check READMEs for more information. You want syntax highlighting and history substring search last. I put them right before prompt. When the prompt has loaded, I know everything has loaded..

pablox-cl commented 10 years ago

@Fl4t, Are you using Arch?

This is likely related to this comment.

Fl4t commented 10 years ago

Yeah, I'm on Arch.

pablox-cl commented 10 years ago

Then, did you take your time to read or search the issues?

This is an Arch Linux specific issue. The workaround is putting your path on ~/.zshrc, which would work, but will mess the $path when you run scripts (since only ~/.zshenv is loaded). Check #500 and the other links inside the following link for more insight.

https://mailman.archlinux.org/pipermail/arch-general/2013-March/033109.html

Fl4t commented 10 years ago

Yeah, I did but not enough efficiently.

Huh, I miss this in the arch-wiki too. I hope my issue will help.

ps : Maybe it should be better to add that note in a troubleshooting section or a warning messages, I don't know.

sorin-ionescu commented 10 years ago

Duplicate of #500.