mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-08-19 21:03:25 -07:00
Updated msys2 to msys2-base-x86_64-20200903
This commit is contained in:
parent
5bc8dbdc75
commit
2307d54cb1
18501 changed files with 1684082 additions and 720361 deletions
|
@ -2,45 +2,49 @@
|
|||
|
||||
_sudo()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
local cur prev words cword split
|
||||
_init_completion -s || return
|
||||
|
||||
local i mode=normal
|
||||
[[ $1 == *sudoedit ]] && mode=edit
|
||||
|
||||
[[ $mode == normal ]] &&
|
||||
for (( i=1; i <= COMP_CWORD; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} != -* ]]; then
|
||||
for (( i=1; i <= cword; i++ )); do
|
||||
if [[ ${words[i]} != -* ]]; then
|
||||
local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
|
||||
local root_command=${COMP_WORDS[i]}
|
||||
local root_command=${words[i]}
|
||||
_command_offset $i
|
||||
return
|
||||
fi
|
||||
if [[ ${COMP_WORDS[i]} == -e ]]; then
|
||||
if [[ ${words[i]} == -@(!(-*)e*|-edit) ]]; then
|
||||
mode=edit
|
||||
break
|
||||
fi
|
||||
[[ ${COMP_WORDS[i]} == -[uUgCp] ]] && ((i++))
|
||||
[[ ${words[i]} == \
|
||||
-@(user|other-user|group|close-from|prompt|!(-*)[uUgCp]) ]] \
|
||||
&& ((i++))
|
||||
done
|
||||
|
||||
case "$prev" in
|
||||
-u|-U)
|
||||
COMPREPLY=( $( compgen -u -- "$cur" ) )
|
||||
--user|--other-user|-!(-*)[uU])
|
||||
COMPREPLY=( $(compgen -u -- "$cur") )
|
||||
return
|
||||
;;
|
||||
-g)
|
||||
COMPREPLY=( $( compgen -g -- "$cur" ) )
|
||||
--group|-!(-*)g)
|
||||
COMPREPLY=( $(compgen -g -- "$cur") )
|
||||
return
|
||||
;;
|
||||
-C|-p)
|
||||
# argument required but no completions available
|
||||
--close-from|--prompt|-!(-*)[Cp])
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
$split && return
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '-A -b -C -E -e -g -H -h -i -K -k -L -l -ll
|
||||
-n -P -p -S -s -U -u -V -v' -- "$cur" ) )
|
||||
local opts=$(_parse_help "$1")
|
||||
COMPREPLY=( $(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur") )
|
||||
[[ $COMPREPLY == *= ]] && compopt -o nospace
|
||||
return
|
||||
fi
|
||||
if [[ $mode == edit ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue