zsh:diffcmds: Add completion function

Completes as the first argument command names and uses then their
completion function to complete the rest.

TODO: <COMMENT>
This commit is contained in:
2025-05-11 16:25:21 +02:00
parent 671d924cca
commit 0e4cf4f947

View File

@@ -0,0 +1,14 @@
#compdef diffcmds
# Very much simplified version of _sudo
local -a args
# TODO: complete behind `--` whatever would have been completed at the position
# of `%%`
args+=(
"(-)1: :{ _command_names -e }"
"*:: :{ _normal }"
)
_arguments $args