From 0e4cf4f9473ec412c451feae5dcc07131ec3d477 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Sun, 11 May 2025 16:25:21 +0200 Subject: [PATCH] zsh:diffcmds: Add completion function Completes as the first argument command names and uses then their completion function to complete the rest. TODO: --- .config/zsh/completion/_diffcmds | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .config/zsh/completion/_diffcmds diff --git a/.config/zsh/completion/_diffcmds b/.config/zsh/completion/_diffcmds new file mode 100644 index 0000000..b1a1f1a --- /dev/null +++ b/.config/zsh/completion/_diffcmds @@ -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