0

I try to ran a script from ~/.dotfiles/bin, but zsh doesn't got it instead the 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$ 
Anton Shuvalov
  • 3,560
  • 3
  • 16
  • 20

1 Answers1

2

Just replace ~/.dotfiles/bin to $HOME/.dotfiles/bin.

Anton Shuvalov
  • 3,560
  • 3
  • 16
  • 20