0

我尝试从 运行脚本~/.dotfiles/bin,但zsh没有得到它,而是 bash:

➜  ~  cat ~/.dotfiles/bin/dotfiles-test 
#!/bin/bash
echo 'hello world'
➜  ~  echo $PATH
/usr/local/share/npm/bin/:~/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
➜  ~  dotfiles-test
zsh: command not found: dotfiles-test
➜  ~  bash
bash-3.2$ source .exports 
bash-3.2$ echo $PATH
/usr/local/share/npm/bin/:~/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:/usr/local/share/npm/bin/:~/.dotfiles/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
bash-3.2$ dotfiles-test 
hello world
bash-3.2$ 
4

1 回答 1

2

只需替换~/.dotfiles/bin$HOME/.dotfiles/bin.

于 2014-07-31T21:36:11.067 回答