elvish_config/lib/moi/completion/sudo.elv

11 lines
327 B
Plaintext
Raw Normal View History

2020-03-13 14:03:36 +00:00
fn complete [@argv]{
if (and (> (count $argv) 2) (has-key $edit:completion:arg-completer $argv[1])) {
2020-07-22 09:24:43 +00:00
$edit:completion:arg-completer[$argv[1]] (all $argv[1:])
2020-03-13 14:03:36 +00:00
} else {
edit:complete-sudo $@argv
}
}
2021-10-13 18:49:48 +00:00
set edit:completion:arg-completer[sudo] = $edit:complete-sudo~
2020-03-13 14:03:36 +00:00
#edit:completion:arg-completer[sudo] = $-complete~