tags:

views:

25

answers:

2

Hi,

I have a local directory with executable in it (e.g. foo_dir/bin/bar). I typed "foo", but foo_dir wasn't suggested. What cames out is other program in $PATH (such as bootlogd).

How should I config my zshrc? Thanks

A: 

I think adding "." to your $PATH variable will fix this issue. By default $PATH contains standard bin directory i.e /usr/bin, /bin, /usr/local/bin.

bhups
It works, but is there better way to do that? I don't want to pollute my $PATH.
Victor
Adding `.` to `$PATH` is a bad idea for security reasons. Please don't do it.
Dennis Williamson
then add your foo_dir/bin to $PATH... :)
bhups
hmm... maybe i need to write my own completer... ;)
Victor
A: 

I found a workable solution, by "setopt autocd", but the side effect is when executing some directory, you'll cd into it.

Victor