File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ _comp_cmd_sudo()
88 local i mode=normal
99 [[ $1 == * sudoedit ]] && mode=edit
1010
11- local noargopts=' !(-*|*[CgpUu ]*)'
11+ local noargopts=' !(-*|*[CDghpRrTtUu ]*)'
1212 [[ $mode == normal ]] &&
1313 for (( i = 1 ; i <= cword; i++ )) ; do
1414 if [[ ${words[i]} != -* ]]; then
@@ -23,7 +23,7 @@ _comp_cmd_sudo()
2323 break
2424 fi
2525 # shellcheck disable=SC2254
26- [[ ${words[i]} == @ (--@ (close-from| group| prompt| other-user| user)| -${noargopts} [CgpUu ]) ]] &&
26+ [[ ${words[i]} == @ (--@ (close-from| chdir | group| host | prompt| chroot | role | command-timeout | type | other-user| user)| -${noargopts} [CDghpRrTtUu ]) ]] &&
2727 (( i++ ))
2828 done
2929
@@ -37,7 +37,16 @@ _comp_cmd_sudo()
3737 _comp_compgen -- -g
3838 return
3939 ;;
40- --close-from | --prompt | -${noargopts} [Cp])
40+ --close-from | --prompt | --role | --type | --command-timeout | \
41+ -${noargopts} [CprTt])
42+ return
43+ ;;
44+ --chdir | --chroot | -${noargopts} [DR])
45+ _comp_compgen_filedir -d
46+ return
47+ ;;
48+ --host | -${noargopts} h)
49+ _comp_compgen_known_hosts -- " $cur "
4150 return
4251 ;;
4352 esac
You can’t perform that action at this time.
0 commit comments