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
:
then typing du
, space , tab autocomplete common prefix thread_pool
, nd click iterate on options:
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
Post a Comment