Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh includes directories in tab completion



Saverio M. wrote on Wed, 02 Jan 2019 15:41 +0100:
> Is this intended? I think it isn't, but I didn't find a way to disable 
> it (there's a lot of documentation around, but the posts I've found talk 
> about tab completion customization).

Yes, it's intended.  You can 'setopt hashexecutablesonly' to disable it.

> $ cat $HOME/.zlogin
> [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # 
> Load RVM into a shell session *as a function*

For future reference, "vanilla" environments don't usually include
random third-party dependencies :)

(The gold standard is 'zsh -f'.)

> $ ls -ld $(find ~/code/scripts -name 'myscript*')

You could have done this with a recursive glob:
.
    % ls -dl ~/code/scripts/**/myscript*

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author