[Nix-dev] ssh and zsh

Mathijs Kwik mathijs at bluescreen303.nl
Mon Aug 13 23:24:54 CEST 2012


Hi all,

Whenever I try to ssh to an account that has zsh as its shell, with a
command to execute, it seems zsh doesn't source the necessary files
that set PATH and other environment variables.

Just "ssh somehost" works fine. I end up in zsh on the remote machine.
But "ssh somehost ls -l" gives
zsh:1: command not found: ls

With bash, I don't have this issue.

My guess is that bash sources extra files that zsh doesn't for
non-interactive shells.
I can probably wrap zsh to pick up these env vars, but perhaps anyone
knows a better way?

Thanks,
Mathijs


More information about the nix-dev mailing list