Reputation: 11
I compiled and installed zsh on server, and put the following line into .bashrc
:
[ -f $ZSH/bin/zsh ] && exec $ZSH/bin/zsh -l
And zsh works well.
Then when I'm using scp from my local computer to copy some files to the server, like
$ scp test.txt user@server:~/
it would stuck forever, without any outputs.
And if I comment the shell line above in .bashrc
, scp worked again.
Upvotes: 1
Views: 1550
Reputation: 31
Put [ -f $ZSH/bin/zsh ] && exec $ZSH/bin/zsh -l
in your .bash_profile
not .bashrc
.
.bash_profile
is only sourced for interactive shells, .bashrc
is sourced all the time. Even when you're just trying to execute a single command on the remote, e.g. scp
instead of an interactive shell (ssh
) and this leads to complications.
Upvotes: 3