4 ms·
> > Jannis Harder told me that the zsh completion for mkdir would run mkdir --help (to see if it’s the GNU variant), which I could verify. > Completions are ty
by LukeShu 5y ago
> > Jannis Harder told me that the zsh completion for mkdir would run mkdir --help (to see if it’s the GNU variant), which I could verify.
> Completions are typically installed as an add-on or as part of a core library of a shell.
Right, but the completions were doing the correct thing for `mkdir`. The problem is that in their dotfiles they told it to use the `mkdir` completions for a command that isn't `mkdir`; and what is correct for `mkdir` isn't correct for that other command.
This fix was to make this edit to their own dotfiles:
-compdef mkcd=mkdir
+_mkcd() { _path_files -/ }
+compdef _mkcd mkcd