sudoedit: New completion.
This commit is contained in:
parent
6621f37c5d
commit
d0a14954ab
1
completions/.gitignore
vendored
1
completions/.gitignore
vendored
@ -151,6 +151,7 @@ smbtree
|
||||
sparc-koji
|
||||
spovray
|
||||
stream
|
||||
sudoedit
|
||||
tightvncviewer
|
||||
tracepath6
|
||||
typeset
|
||||
|
@ -498,6 +498,7 @@ CLEANFILES = \
|
||||
sparc-koji \
|
||||
spovray \
|
||||
stream \
|
||||
sudoedit \
|
||||
tightvncviewer \
|
||||
tracepath6 \
|
||||
typeset \
|
||||
@ -770,6 +771,10 @@ symlinks:
|
||||
rm -f $(targetdir)/$$file && \
|
||||
$(LN_S) ssh $(targetdir)/$$file ; \
|
||||
done
|
||||
for file in sudoedit ; do \
|
||||
rm -f $(targetdir)/$$file && \
|
||||
$(LN_S) sudo $(targetdir)/$$file ; \
|
||||
done
|
||||
for file in tracepath6 ; do \
|
||||
rm -f $(targetdir)/$$file && \
|
||||
$(LN_S) tracepath $(targetdir)/$$file ; \
|
||||
|
@ -6,6 +6,9 @@ _sudo()
|
||||
_init_completion || return
|
||||
|
||||
local i mode=normal
|
||||
[[ $1 == *sudoedit ]] && mode=edit
|
||||
|
||||
[[ $mode == normal ]] &&
|
||||
for (( i=1; i <= COMP_CWORD; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} != -* ]]; then
|
||||
local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
||||
@ -43,6 +46,6 @@ _sudo()
|
||||
if [[ $mode == edit ]]; then
|
||||
_filedir
|
||||
fi
|
||||
} && complete -F _sudo sudo
|
||||
} && complete -F _sudo sudo sudoedit
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
||||
|
Loading…
x
Reference in New Issue
Block a user