osx - zsh: how to autocomplete file names after python script name? -


i've moved bash zsh. it's great terminal shell, i'm missing 1 property - file name completion non-standard executables.

for example, if ls gives thread_pool_examples , thread_pools:

enter image description here

then typing du, space , tab autocomplete common prefix thread_pool, nd click iterate on options:

enter image description here enter image description here

clicking enter pick highlighted item.

the problem not work custom scripts. example, if run rmf - python executable in path - , click tab, no autocomplete options appear.

any ideas how make zsh autocomplete filenames every executable?

honestly, imo in shell configuration breaking things up. try doing verify it:

zsh -f # starts new shell ignoring configuration autoload compinit compinit ./my-shell-script [tab] 

it completes files. default.

fwiw, if want bind particular completer command/alias etc, can do

compdef _jstack jstack  # simple _files completion compdef _files my-local-python-script  # restrict file extensions compdef '_files -g "*.(eps|ps|pdf)"' okular  

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -