diff --git a/completion/doas.elv b/completion/doas.elv new file mode 100644 index 0000000..74f7e6e --- /dev/null +++ b/completion/doas.elv @@ -0,0 +1,10 @@ +fn complete {|@argv| + if (and (> (count $argv) 2) (has-key $edit:completion:arg-completer $argv[1])) { + $edit:completion:arg-completer[$argv[1]] (all $argv[1:]) + } else { + edit:complete-sudo $@argv + } +} + +set edit:completion:arg-completer[doas] = $edit:complete-sudo~ +#edit:completion:arg-completer[doas] = $-complete~