Here's an example snippet from my current zsh session:
llama@llama:...Code/cpp/KingOfTheCode$ make
clang++ -std=c++11 -Iinclude src/*.cpp kothsrc/*.cpp -pthread -o KingOfTheCode
llama@llama:...Code/cpp/KingOfTheCode$ ./
Completing executable file or directory
include/ KingOfTheCode* kothsrc/ src/
(I typed a .
, a /
, and then a Tab character for autocompletion.)
Why does zsh suggest directories when I type ./<tab>
? I clearly want to execute a file, and if I wanted to execute something in a subdirectory the ./
part would be useless.
How can I prevent this annoying behavior from occurring? Just to be clear, my desired behavior is that autocompletion for ./<...>
excludes directories and only looks for executable files.