My zsh is doing something odd, it is running an executable that is not the first executable on my path. I have a wrapper script for ssh but the wrapper is not being invoked while the real ssh binary is being invoked instead.
$ echo $SHELL /bin/zsh $ echo $PATH /home/user1/bin:/home/user1/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/X11R6/bin:/usr/X11/bin:/usr/kerberos/bin $ which ssh ~/bin/ssh $ builtin which -a ssh /home/user1/bin/ssh /usr/bin/ssh $ alias l.='ls -d .* --color=tty' ll='ls -lh' ls='ls --color=auto' run-help=man vi=vim which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde' which-command=whence zcp='noglob zmv -W -C' zln='noglob zmv -W -L' zmv='noglob zmv -W -M'
I tried running 'ssh' in bash and my wrapper script was invoked, so it seems like it's a problem with zsh.
Please let me now if any other diagnostic information is needed.
I would really like to know why is it that the $PATH variable is being ignored when I try to invoke ssh.
Added the output from 'builtin which -a ssh'