Not a duplicate:
I’m not looking for a way to complete directory names or execute scripts from a fixed directory. The issue I’m trying to solve is to get completion for the current directory without pressing /
I want zsh to tab-complete
./ like bash.
With bash I’m used to press .TABTAB to see all files in the current working directory since it first completes to
./ and then shows all content in that directory. Reason for my desire to avoid / at all cost is that / is way harder on my german keyboard than TAB since it’s either with 2 fingers with shift or far away on numpad and I’d rather switch back to bash than type a
/. What I’d like to achieve, in other words what bash does:
$ . <TAB> $ ./ <TAB> foo.sh somedir/ $ ./ <F><TAB> $ ./foo.sh <ENTER>
Using zsh / oh-my-zsh when I hit .TAB I get
. (dot space) which is not useful at all for me.
zstyle ':completion:*' special-dirs truewith
setopt auto_cd(which is oh-my-zsh default) gives me the even less useful option for
../on top, so I turned that off already. I’m happy with completion of
- There is no
$PATHand it should stay that way. Though I wouldn’t mind completion of e.g.
How can I teach zsh to complete
./ or even better to local directory content right away? Or is there another way to work with local script files in an efficient way that does not involve /?