I have noticed that unless I add an .sh extension to my shell scripts, Zsh does not suggest them for autocompletion for execution despite having them in my PATH. I have the same problem if I cd into the directory and start typing the filename.When I say for execution I mean typing the file directly on the prompt, i.e.:$ my_shell_scriptAre there any options in Zsh that control which file extensions are considered for this type of autocompletion?
Files with no .sh extension not considered for autocompletion in zsh
shell script;zsh;autocomplete
Have your shell scripts start with the appropriate shebang (#!) and with the execution permission bits on. zsh will then recognize them as proper executable files.(With some configurations, you might have to refresh zsh paths cache. Restarting it with exec zsh is one way to do it.)