elvish_config/lib/moi/completion/sudo.elv

11 lines
323 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
}
}
edit:completion:arg-completer[sudo] = $edit:complete-sudo~
#edit:completion:arg-completer[sudo] = $-complete~