I don't like typing underscores, and would like to type a dash instead, and have zsh autocompletion treat it like it could be either a dash or an underscore.
Is this possible with built-in zsh capabilities, oh-my-zsh or something else? Would it be possible globally, and if not, would it be possible for a single autocompletion function?
Aside: I currently have a customized completion function for bashmarks that just translates underscores to dashes when providing possible completions, and would like to replace/improve it.
Best Answer
The
zshcompsys
man page has a similar example to get case insensitive completionChanging it to make
-
and_
equivalent seems to do what you wantOr you could add it to the first example, and get case insensitive completion too