Autocomplete of diff command not working in zsh / oh-my-zsh
4
votes
3
answers
1670
views
On MacOS I am using oh-my-zsh with no customization that I know of.
Autocompletion is mostly working quite nicely and I'm very happy with it. But for some reason the
diff
command is different.
➜ ls file
file1 file2
➜ diff file1 file # Rings bell and no completion
➜ diff file1 # Gives me a "-" completion
➜ diff file1 -
-b -- skip trailing white spaces
-c -- output a context diff
-e -- output an ed script
-f -- output a reversed ed script
-r -- recursively compare subdirectories
So diff
seems unaware that you can provide a second argument as the second file to diff, and it only seems to only accept command options as the second thing.
Any ideas what is happening or how to fix this?
In general, is there an easy way to configure to fully disable the smart completion for a particular command? I did compdef _files diff
and that worked in that shell but not in subsequent new shells.
Asked by Tom Aldcroft
(141 rep)
Dec 31, 2022, 06:49 PM
Last activity: Sep 11, 2024, 09:16 AM
Last activity: Sep 11, 2024, 09:16 AM