mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-08-19 21:03:25 -07:00
Updated msys2
This commit is contained in:
parent
6a85995508
commit
f0dc1ea8b0
13308 changed files with 689276 additions and 46605 deletions
|
@ -1358,14 +1358,17 @@ _get_first_arg()
|
|||
# This function counts the number of args, excluding options
|
||||
# @param $1 chars Characters out of $COMP_WORDBREAKS which should
|
||||
# NOT be considered word breaks. See __reassemble_comp_words_by_ref.
|
||||
# @param $2 glob Options whose following argument should not be counted
|
||||
_count_args()
|
||||
{
|
||||
local i cword words
|
||||
__reassemble_comp_words_by_ref "$1" words cword
|
||||
|
||||
args=1
|
||||
for i in "${words[@]:1:cword-1}"; do
|
||||
[[ "$i" != -* ]] && args=$(($args+1))
|
||||
for (( i=1; i < cword; i++ )); do
|
||||
if [[ ${words[i]} != -* && ${words[i-1]} != $2 ]]; then
|
||||
args=$(($args+1))
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
@ -1900,7 +1903,13 @@ complete -F _longopt a2ps awk base64 bash bc bison cat chroot colordiff cp \
|
|||
sed seq sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \
|
||||
texindex touch tr uname unexpand uniq units vdir wc who
|
||||
|
||||
declare -A _xspecs
|
||||
# declare only knows -g in bash >= 4.2.
|
||||
if [[ ${BASH_VERSINFO[0]} -gt 4 ||
|
||||
${BASH_VERSINFO[0]} -eq 4 && ${BASH_VERSINFO[1]} -ge 2 ]]; then
|
||||
declare -Ag _xspecs
|
||||
else
|
||||
declare -A _xspecs
|
||||
fi
|
||||
_filedir_xspec()
|
||||
{
|
||||
local cur prev words cword
|
||||
|
@ -2028,6 +2037,7 @@ __load_completion()
|
|||
{
|
||||
local -a dirs=( ${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions )
|
||||
local OIFS=$IFS IFS=: dir cmd="${1##*/}" compfile
|
||||
[[ -n $cmd ]] || return 1
|
||||
for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do
|
||||
dirs+=( $dir/bash-completion/completions )
|
||||
done
|
||||
|
|
|
@ -1,59 +1,93 @@
|
|||
_blkid_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
local cur prev OPTS OUTPUT_ALL
|
||||
OUTPUT_ALL=''
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c')
|
||||
'-c'|'--cache-file')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-o')
|
||||
'-o'|'--output')
|
||||
COMPREPLY=( $(compgen -W "value device export full" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s')
|
||||
'-s'|'--match-tag')
|
||||
COMPREPLY=( $(compgen -W "tag" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-t')
|
||||
COMPREPLY=( $(compgen -W "token" -- $cur) )
|
||||
'-t'|'--match-token')
|
||||
COMPREPLY=( $(compgen -W "TYPE= LABEL= UUID=" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-L')
|
||||
'-L'|'--label')
|
||||
COMPREPLY=( $(compgen -W "$(cd /dev/disk/by-label/ 2>/dev/null && echo *)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-U')
|
||||
'-U'|'--uuid')
|
||||
COMPREPLY=( $(compgen -W "$(cd /dev/disk/by-uuid/ 2>/dev/null && echo *)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s')
|
||||
'-S'|'--size')
|
||||
COMPREPLY=( $(compgen -W "size" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-O')
|
||||
'-O'|'--offset')
|
||||
COMPREPLY=( $(compgen -W "offset" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-u')
|
||||
COMPREPLY=( $(compgen -W "filesystem raid crypto other nofilesystem noraid nocrypto noother" -- $cur) )
|
||||
return 0
|
||||
'-u'|'--usages')
|
||||
OUTPUT_ALL={,no}{filesystem,raid,crypto,other}
|
||||
;;
|
||||
'-n')
|
||||
COMPREPLY=( $(compgen -W "$(awk '{print $NF}' /proc/filesystems)" -- $cur) )
|
||||
return 0
|
||||
'-n'|'--match-types')
|
||||
OUTPUT_ALL="
|
||||
$(awk '{print $NF}' /proc/filesystems)
|
||||
$(\ls /lib/modules/$(uname -r)/kernel/fs)
|
||||
"
|
||||
;;
|
||||
'-h'|'-V')
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
if [ -n "$OUTPUT_ALL" ]; then
|
||||
local prefix realcur OUTPUT_ALL OUTPUT
|
||||
realcur="${cur##*,}"
|
||||
prefix="${cur%$realcur}"
|
||||
for WORD in $OUTPUT_ALL; do
|
||||
if ! [[ $prefix == *"$WORD"* ]]; then
|
||||
OUTPUT="$WORD ${OUTPUT:-""}"
|
||||
fi
|
||||
done
|
||||
compopt -o nospace
|
||||
COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- "$realcur") )
|
||||
return 0
|
||||
fi
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="-c -d -h -g -o -k -s -t -l -L -U -V -p -i -S -O -u -n"
|
||||
OPTS="
|
||||
--cache-file
|
||||
--no-encoding
|
||||
--garbage-collect
|
||||
--output
|
||||
--list-filesystems
|
||||
--match-tag
|
||||
--match-token
|
||||
--list-one
|
||||
--label
|
||||
--uuid
|
||||
--probe
|
||||
--info
|
||||
--size
|
||||
--offset
|
||||
--usages
|
||||
--match-types
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -3,15 +3,23 @@ _cal_module()
|
|||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--one --three --sunday --monday --julian --year --week --version --help"
|
||||
OPTS=" --one
|
||||
--three
|
||||
--months
|
||||
--sunday
|
||||
--span
|
||||
--monday
|
||||
--julian
|
||||
--year
|
||||
--twelve
|
||||
--week
|
||||
--color=auto
|
||||
--color=always
|
||||
--color=never
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -5,11 +5,19 @@ _column_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c'|'--columns')
|
||||
'-c'|'--output-width')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s'|'--separator'|'-o'|'--output-separator')
|
||||
'-s'|'--separator'|'-o'|'--output-separator'|'-n'|'--table-name'|'-O')
|
||||
COMPREPLY=( $(compgen -W "string" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-O'|'--table-order'|'-N'|'--table-columns'|'-E'|'--table-noextreme'|'-H'|'--table-hide'|'-R'|'--table-right'|'-T'|'--table-truncate'|'-W'|'--table-wrap')
|
||||
COMPREPLY=( $(compgen -W "string" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-r'|'--tree'|'-i'|'--tree-id'|'-p'|'--tree-parent')
|
||||
COMPREPLY=( $(compgen -W "string" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
@ -21,6 +29,22 @@ _column_module()
|
|||
-*)
|
||||
OPTS="--columns
|
||||
--table
|
||||
--table-name
|
||||
--table-order
|
||||
--table-columns
|
||||
--table-noextreme
|
||||
--table-noheadings
|
||||
--table-header-repeat
|
||||
--table-hide
|
||||
--table-right
|
||||
--table-truncate
|
||||
--table-wrap
|
||||
--table-empty-lines
|
||||
--json
|
||||
--tree
|
||||
--tree-id
|
||||
--tree-parent
|
||||
--output-width
|
||||
--separator
|
||||
--output-separator
|
||||
--fillrows
|
||||
|
|
|
@ -21,11 +21,46 @@ _fdisk_module()
|
|||
COMPREPLY=( $(compgen -W "auto never always" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'--output')
|
||||
local prefix realcur OUTPUT_ALL OUTPUT
|
||||
realcur="${cur##*,}"
|
||||
prefix="${cur%$realcur}"
|
||||
OUTPUT_ALL="
|
||||
Attrs
|
||||
Boot
|
||||
Bsize
|
||||
Cpg
|
||||
Cylinders
|
||||
Device
|
||||
End
|
||||
End-C/H/S
|
||||
Flags
|
||||
Fsize
|
||||
Id
|
||||
Name
|
||||
Sectors
|
||||
Size
|
||||
Slice
|
||||
Start
|
||||
Start-C/H/S
|
||||
Type
|
||||
Type-UUID
|
||||
UUID
|
||||
"
|
||||
for WORD in $OUTPUT_ALL; do
|
||||
if ! [[ $prefix == *"$WORD"* ]]; then
|
||||
OUTPUT="$WORD ${OUTPUT:-""}"
|
||||
fi
|
||||
done
|
||||
compopt -o nospace
|
||||
COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- "$realcur") )
|
||||
return 0
|
||||
;;
|
||||
'-u'|'--units')
|
||||
COMPREPLY=( $(compgen -W "cylinders sectors" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-C'|'--geom-cylinders'|'-H'|'--geom-heads'|'-S'|'--geom-sectors')
|
||||
'-C'|'--cylinders'|'-H'|'--heads'|'-S'|'--sectors')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
@ -36,15 +71,20 @@ _fdisk_module()
|
|||
case $cur in
|
||||
-*)
|
||||
OPTS="--sector-size
|
||||
--protect-boot
|
||||
--compatibility
|
||||
--color
|
||||
--list
|
||||
--output
|
||||
--type
|
||||
--units
|
||||
--getsz
|
||||
--geom-cylinders
|
||||
--geom-heads
|
||||
--geom-sectors
|
||||
--bytes
|
||||
--wipe
|
||||
--wipe-partitions
|
||||
--cylinders
|
||||
--heads
|
||||
--sectors
|
||||
--help
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
|
|
34
msys2/usr/share/bash-completion/completions/findfs
Normal file
34
msys2/usr/share/bash-completion/completions/findfs
Normal file
|
@ -0,0 +1,34 @@
|
|||
_findfs_module()
|
||||
{
|
||||
local cur prev OPTS findable
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
for i in $(lsblk -rpno label); do
|
||||
findable+=" LABEL=$i"
|
||||
done
|
||||
for i in $(lsblk -rpno uuid); do
|
||||
findable+=" UUID=$i"
|
||||
done
|
||||
for i in $(lsblk -rpno partlabel); do
|
||||
findable+=" PARTLABEL=$i"
|
||||
done
|
||||
for i in $(lsblk -rpno partuuid); do
|
||||
findable+=" PARTUUID=$i"
|
||||
done
|
||||
COMPREPLY=( $(compgen -W "$findable" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _findfs_module findfs
|
|
@ -32,6 +32,7 @@ _flock_module()
|
|||
--conflict-exit-code
|
||||
--close
|
||||
--command
|
||||
--no-fork
|
||||
--help
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
|
|
|
@ -5,7 +5,11 @@ _fsck.cramfs_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-x'|'--destination')
|
||||
'-b'|'--blocksize')
|
||||
COMPREPLY=( $(compgen -W "size" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'--extract')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
|
||||
|
@ -15,8 +19,15 @@ _fsck.cramfs_module()
|
|||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS='--verbose --destination --help --version file'
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -S ' ' -- $cur) )
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $(compgen -W "--verbose --blocksize --extract --help --version" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _fsck.cramfs_module fsck.cramfs
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
_fsck.minix_module()
|
||||
{
|
||||
local cur prev OPTS DEVS
|
||||
local cur OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-V'|'--version')
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--list --auto --repair --verbose --super --uncleared --force --help --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS="-l -a -r -v -s -m -f --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]} $(lsblk -pnro name)" -- $cur) )
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _fsck.minix_module fsck.minix
|
||||
|
|
|
@ -21,7 +21,7 @@ __gsettings() {
|
|||
|
||||
case "$((${COMP_CWORD}-$coffset))" in
|
||||
1)
|
||||
choices=$'--schemadir\n--version\nhelp \nlist-schemas\nlist-relocatable-schemas\nlist-keys \nlist-children \nlist-recursively \nget \nrange \nset \nreset \nreset-recursively \nwritable \nmonitor'
|
||||
choices=$'--schemadir\n--version\nhelp \nlist-schemas\nlist-relocatable-schemas\nlist-keys \nlist-children \nlist-recursively \nget \nrange \nset \nreset \nreset-recursively \nwritable \nmonitor \ndescribe '
|
||||
;;
|
||||
|
||||
2)
|
||||
|
@ -38,7 +38,7 @@ __gsettings() {
|
|||
choices="$(gsettings $schemadir list-schemas)"$'\n'"$(gsettings $schemadir list-relocatable-schemas | sed -e 's.$.:/.')"
|
||||
;;
|
||||
|
||||
get|range|set|reset|writable|monitor)
|
||||
get|range|set|reset|writable|monitor|describe)
|
||||
choices="$(gsettings $schemadir list-schemas | sed -e 's.$. .')"$'\n'"$(gsettings $schemadir list-relocatable-schemas | sed -e 's.$.:/.')"
|
||||
;;
|
||||
esac
|
||||
|
@ -50,7 +50,7 @@ __gsettings() {
|
|||
choices="$(gsettings $schemadir list-keys ${COMP_WORDS[$(($coffset+2))]} 2> /dev/null | sed -e 's.$. .')"
|
||||
;;
|
||||
|
||||
get|range|reset|writable|monitor)
|
||||
get|range|reset|writable|monitor|describe)
|
||||
choices="$(gsettings $schemadir list-keys ${COMP_WORDS[$(($coffset+2))]} 2> /dev/null)"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -5,6 +5,10 @@ _hexdump_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-L'|'--color')
|
||||
COMPREPLY=( $(compgen -W "auto never always" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-e'|'--format')
|
||||
COMPREPLY=( $(compgen -W "format" -- $cur) )
|
||||
return 0
|
||||
|
@ -29,6 +33,7 @@ _hexdump_module()
|
|||
--two-bytes-decimal
|
||||
--two-bytes-octal
|
||||
--two-bytes-hex
|
||||
--color=
|
||||
--format
|
||||
--format-file
|
||||
--length
|
||||
|
|
27
msys2/usr/share/bash-completion/completions/ipcmk
Normal file
27
msys2/usr/share/bash-completion/completions/ipcmk
Normal file
|
@ -0,0 +1,27 @@
|
|||
_ipcmk_module()
|
||||
{
|
||||
local cur prev
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-M'|'--shmem')
|
||||
COMPREPLY=( $(compgen -W "size" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-S'|'--semaphore')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-p'|'--mode')
|
||||
COMPREPLY=( $(compgen -W "mode" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W "--shmem --semaphore --queue --mode --help --version" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _ipcmk_module ipcmk
|
|
@ -13,8 +13,15 @@ _isosize_module()
|
|||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS='--divisor --sectors --help --version'
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $(compgen -W "--divisor --sectors --help --version" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _isosize_module isosize
|
||||
|
|
|
@ -31,13 +31,44 @@ _logger_module()
|
|||
COMPREPLY=( $(compgen -W "$(awk '$NF ~ /^\// {print $NF}' /proc/net/unix)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'--socket-errors')
|
||||
COMPREPLY=( $(compgen -W "on off auto" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'--msgid')
|
||||
COMPREPLY=( $(compgen -W "msgid" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--journald --udp --id --file --help --server --skip-empty --port --priority --rfc3164 --rfc5424 --stderr --tag --size --socket --version"
|
||||
OPTS="
|
||||
--file
|
||||
--help
|
||||
--id
|
||||
--journald
|
||||
--msgid
|
||||
--no-act
|
||||
--octet-count
|
||||
--port
|
||||
--prio-prefix
|
||||
--priority
|
||||
--rfc3164
|
||||
--rfc5424
|
||||
--server
|
||||
--size
|
||||
--skip-empty
|
||||
--socket
|
||||
--socket-errors
|
||||
--stderr
|
||||
--tag
|
||||
--tcp
|
||||
--udp
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -20,9 +20,16 @@ _look_module()
|
|||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
case $COMP_CWORD in
|
||||
1)
|
||||
COMPREPLY=( $(compgen -W "$(look "$cur")" -- $cur) )
|
||||
;;
|
||||
2)
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _look_module look
|
||||
|
|
|
@ -24,7 +24,7 @@ _arch_ptr2comp() {
|
|||
}
|
||||
|
||||
_arch_incomp() {
|
||||
local r="\s-(-${1#* }\s|\w*${1% *})"; [[ $COMP_LINE =~ $r ]]
|
||||
local r="[[:space:]]-(-${1#* }[[:space:]]|[[:alnum:]_]*${1% *})"; [[ $COMP_LINE =~ $r ]]
|
||||
}
|
||||
|
||||
_pacman_keyids() {
|
||||
|
@ -74,7 +74,7 @@ _makepkg() {
|
|||
local cur opts prev
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev
|
||||
if [[ $cur = -* && ! $prev =~ ^-(-(config|help|key|version)$|\w*[Vhp]) ]]; then
|
||||
if [[ $cur = -* && ! $prev =~ ^-(-(config|help|key|version)$|[[:alnum:]_]*[Vhp]) ]]; then
|
||||
opts=('allsource asdeps check clean cleanbuild config force geninteg help
|
||||
holdver ignorearch install key log needed noarchive nobuild nocheck
|
||||
nocolor noconfirm nodeps noextract noprepare noprogressbar nosign
|
||||
|
@ -96,14 +96,18 @@ _pacman_pkg() {
|
|||
)"
|
||||
}
|
||||
|
||||
_pacman_repo_list() {
|
||||
_arch_compgen "$(pacman-conf --repo-list)"
|
||||
}
|
||||
|
||||
_pacman() {
|
||||
local common core cur database prev query remove sync upgrade o
|
||||
local common core cur database files prev query remove sync upgrade o
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev
|
||||
database=('asdeps asexplicit')
|
||||
files=('list machinereadable owns search refresh regex' 'l o s x y')
|
||||
query=('changelog check deps explicit file foreign groups info list owns
|
||||
search unrequired upgrades' 'c e g i k l m o p s t u')
|
||||
query=('changelog check deps explicit file foreign groups info list native owns
|
||||
search unrequired upgrades' 'c e g i k l m n o p s t u')
|
||||
remove=('cascade dbonly nodeps assume-installed nosave print recursive unneeded' 'c n p s u')
|
||||
sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup
|
||||
info list needed nodeps assume-installed print refresh recursive search sysupgrade'
|
||||
|
@ -119,7 +123,7 @@ _pacman() {
|
|||
|
||||
if [[ $? != 0 ]]; then
|
||||
_arch_ptr2comp core
|
||||
elif [[ ! $prev =~ ^-\w*[Vbhr] &&
|
||||
elif [[ ! $prev =~ ^-[[:alnum:]_]*[Vbhr] &&
|
||||
! $prev = --@(cachedir|color|config|dbpath|help|hookdir|gpgdir|logfile|root|version) ]]
|
||||
then
|
||||
[[ $cur = -* ]] && _arch_ptr2comp ${o#* } common ||
|
||||
|
@ -136,7 +140,7 @@ _pacman() {
|
|||
_pacman_pkg Qq;;
|
||||
S)
|
||||
{ _arch_incomp 'g groups' && _pacman_pkg Sg; } ||
|
||||
{ _arch_incomp 'l list' && _pacman_pkg Sl sort; } ||
|
||||
{ _arch_incomp 'l list' && _pacman_repo_list; } ||
|
||||
_pacman_pkg Slq;;
|
||||
U)
|
||||
_pacman_file;;
|
||||
|
|
|
@ -11,13 +11,17 @@ _mcookie_module()
|
|||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-m'|'--max-size')
|
||||
COMPREPLY=( $(compgen -W "bytes" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--file --verbose --version --help"
|
||||
OPTS="--file --max-size --verbose --version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_mkfs_module()
|
||||
{
|
||||
local cur prev OPTS DEVS
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
_mkfs.bfs_module()
|
||||
{
|
||||
local cur prev OPTS DEVS
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
|
|
|
@ -5,30 +5,27 @@ _mkfs.minix_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-i')
|
||||
'-i'|'--inodes')
|
||||
COMPREPLY=( $(compgen -W "inodes" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-l')
|
||||
COMPREPLY=( $(compgen -W "badblocks-file" -- $cur) )
|
||||
'-l'|'--badblocks')
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n')
|
||||
COMPREPLY=( $(compgen -W "14 30" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-V'|'--version')
|
||||
'-n'|'--namelength')
|
||||
COMPREPLY=( $(compgen -W "14 30 60" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="-c -i -l -n -1 -2 -3"
|
||||
OPTS="--namelength --inodes --check --badblocks --help --version -1 -2 -3"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local DEVS
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
|
|
|
@ -17,7 +17,11 @@ _mkswap_module()
|
|||
COMPREPLY=( $(compgen -W "1" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-U'|'--uuid'|'-h'|'--help'|'-V'|'--version')
|
||||
'-U'|'--uuid')
|
||||
COMPREPLY=( $(compgen -W "$(uuidgen -r)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -24,7 +24,7 @@ _arch_ptr2comp() {
|
|||
}
|
||||
|
||||
_arch_incomp() {
|
||||
local r="\s-(-${1#* }\s|\w*${1% *})"; [[ $COMP_LINE =~ $r ]]
|
||||
local r="[[:space:]]-(-${1#* }[[:space:]]|[[:alnum:]_]*${1% *})"; [[ $COMP_LINE =~ $r ]]
|
||||
}
|
||||
|
||||
_pacman_keyids() {
|
||||
|
@ -74,7 +74,7 @@ _makepkg() {
|
|||
local cur opts prev
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev
|
||||
if [[ $cur = -* && ! $prev =~ ^-(-(config|help|key|version)$|\w*[Vhp]) ]]; then
|
||||
if [[ $cur = -* && ! $prev =~ ^-(-(config|help|key|version)$|[[:alnum:]_]*[Vhp]) ]]; then
|
||||
opts=('allsource asdeps check clean cleanbuild config force geninteg help
|
||||
holdver ignorearch install key log needed noarchive nobuild nocheck
|
||||
nocolor noconfirm nodeps noextract noprepare noprogressbar nosign
|
||||
|
@ -96,14 +96,18 @@ _pacman_pkg() {
|
|||
)"
|
||||
}
|
||||
|
||||
_pacman_repo_list() {
|
||||
_arch_compgen "$(pacman-conf --repo-list)"
|
||||
}
|
||||
|
||||
_pacman() {
|
||||
local common core cur database prev query remove sync upgrade o
|
||||
local common core cur database files prev query remove sync upgrade o
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev
|
||||
database=('asdeps asexplicit')
|
||||
files=('list machinereadable owns search refresh regex' 'l o s x y')
|
||||
query=('changelog check deps explicit file foreign groups info list owns
|
||||
search unrequired upgrades' 'c e g i k l m o p s t u')
|
||||
query=('changelog check deps explicit file foreign groups info list native owns
|
||||
search unrequired upgrades' 'c e g i k l m n o p s t u')
|
||||
remove=('cascade dbonly nodeps assume-installed nosave print recursive unneeded' 'c n p s u')
|
||||
sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup
|
||||
info list needed nodeps assume-installed print refresh recursive search sysupgrade'
|
||||
|
@ -119,7 +123,7 @@ _pacman() {
|
|||
|
||||
if [[ $? != 0 ]]; then
|
||||
_arch_ptr2comp core
|
||||
elif [[ ! $prev =~ ^-\w*[Vbhr] &&
|
||||
elif [[ ! $prev =~ ^-[[:alnum:]_]*[Vbhr] &&
|
||||
! $prev = --@(cachedir|color|config|dbpath|help|hookdir|gpgdir|logfile|root|version) ]]
|
||||
then
|
||||
[[ $cur = -* ]] && _arch_ptr2comp ${o#* } common ||
|
||||
|
@ -136,7 +140,7 @@ _pacman() {
|
|||
_pacman_pkg Qq;;
|
||||
S)
|
||||
{ _arch_incomp 'g groups' && _pacman_pkg Sg; } ||
|
||||
{ _arch_incomp 'l list' && _pacman_pkg Sl sort; } ||
|
||||
{ _arch_incomp 'l list' && _pacman_repo_list; } ||
|
||||
_pacman_pkg Slq;;
|
||||
U)
|
||||
_pacman_file;;
|
||||
|
|
|
@ -24,7 +24,7 @@ _arch_ptr2comp() {
|
|||
}
|
||||
|
||||
_arch_incomp() {
|
||||
local r="\s-(-${1#* }\s|\w*${1% *})"; [[ $COMP_LINE =~ $r ]]
|
||||
local r="[[:space:]]-(-${1#* }[[:space:]]|[[:alnum:]_]*${1% *})"; [[ $COMP_LINE =~ $r ]]
|
||||
}
|
||||
|
||||
_pacman_keyids() {
|
||||
|
@ -74,7 +74,7 @@ _makepkg() {
|
|||
local cur opts prev
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev
|
||||
if [[ $cur = -* && ! $prev =~ ^-(-(config|help|key|version)$|\w*[Vhp]) ]]; then
|
||||
if [[ $cur = -* && ! $prev =~ ^-(-(config|help|key|version)$|[[:alnum:]_]*[Vhp]) ]]; then
|
||||
opts=('allsource asdeps check clean cleanbuild config force geninteg help
|
||||
holdver ignorearch install key log needed noarchive nobuild nocheck
|
||||
nocolor noconfirm nodeps noextract noprepare noprogressbar nosign
|
||||
|
@ -96,14 +96,18 @@ _pacman_pkg() {
|
|||
)"
|
||||
}
|
||||
|
||||
_pacman_repo_list() {
|
||||
_arch_compgen "$(pacman-conf --repo-list)"
|
||||
}
|
||||
|
||||
_pacman() {
|
||||
local common core cur database prev query remove sync upgrade o
|
||||
local common core cur database files prev query remove sync upgrade o
|
||||
COMPREPLY=()
|
||||
_get_comp_words_by_ref cur prev
|
||||
database=('asdeps asexplicit')
|
||||
files=('list machinereadable owns search refresh regex' 'l o s x y')
|
||||
query=('changelog check deps explicit file foreign groups info list owns
|
||||
search unrequired upgrades' 'c e g i k l m o p s t u')
|
||||
query=('changelog check deps explicit file foreign groups info list native owns
|
||||
search unrequired upgrades' 'c e g i k l m n o p s t u')
|
||||
remove=('cascade dbonly nodeps assume-installed nosave print recursive unneeded' 'c n p s u')
|
||||
sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup
|
||||
info list needed nodeps assume-installed print refresh recursive search sysupgrade'
|
||||
|
@ -119,7 +123,7 @@ _pacman() {
|
|||
|
||||
if [[ $? != 0 ]]; then
|
||||
_arch_ptr2comp core
|
||||
elif [[ ! $prev =~ ^-\w*[Vbhr] &&
|
||||
elif [[ ! $prev =~ ^-[[:alnum:]_]*[Vbhr] &&
|
||||
! $prev = --@(cachedir|color|config|dbpath|help|hookdir|gpgdir|logfile|root|version) ]]
|
||||
then
|
||||
[[ $cur = -* ]] && _arch_ptr2comp ${o#* } common ||
|
||||
|
@ -136,7 +140,7 @@ _pacman() {
|
|||
_pacman_pkg Qq;;
|
||||
S)
|
||||
{ _arch_incomp 'g groups' && _pacman_pkg Sg; } ||
|
||||
{ _arch_incomp 'l list' && _pacman_pkg Sl sort; } ||
|
||||
{ _arch_incomp 'l list' && _pacman_repo_list; } ||
|
||||
_pacman_pkg Slq;;
|
||||
U)
|
||||
_pacman_file;;
|
||||
|
|
|
@ -17,13 +17,13 @@ __hasprefix() {
|
|||
_pkgfile() {
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD - 1]} prevprev=${COMP_WORDS[COMP_CWORD - 2]}
|
||||
|
||||
local shortopts=(-l -s -u -b -C -g -i -q -R -r -h -V -v -w -z -0)
|
||||
local shortopts=(-l -s -u -b -C -D -g -i -q -R -r -h -V -v -w -z -0)
|
||||
local longopts=(--list --search --update --binaries --glob --ignorecase
|
||||
--quiet --regex --help --version --verbose --raw --null)
|
||||
local longoptsarg=(--compress --config --repo)
|
||||
local longoptsarg=(--compress --config --cachedir --repo)
|
||||
local allopts=("${shortopts[@]}" "${longopts[@]}" "${longoptsarg[@]}")
|
||||
|
||||
local compressopts=(none gzip bzip2 lzma lzop xz)
|
||||
local compressopts=(none gzip bzip2 lz4 lzma lzop xz)
|
||||
|
||||
# maybe mangle the arguments in case we're looking at a --longopt=$val
|
||||
[[ $cur = '=' ]] && cur=
|
||||
|
@ -37,6 +37,11 @@ _pkgfile() {
|
|||
compopt -o filenames
|
||||
return 0
|
||||
;;
|
||||
-D|--cachedir)
|
||||
COMPREPLY=($(compgen -d -- "$cur"))
|
||||
compopt -o filenames
|
||||
return 0
|
||||
;;
|
||||
-z|--compress)
|
||||
COMPREPLY=($(compgen -W '${compressopts[*]}' -- "$cur"))
|
||||
return 0
|
||||
|
|
|
@ -11,7 +11,7 @@ _rename_module()
|
|||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--verbose --symlink --help --version"
|
||||
OPTS="--verbose --symlink --help --version --no-act --no-override --interactive"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -17,7 +17,7 @@ _renice_module()
|
|||
;;
|
||||
'-p'|'--pid')
|
||||
local PIDS
|
||||
PIDS=$(for I in /proc/[0-9]*; do echo ${I##"/proc/"}; done)
|
||||
PIDS=$(cd /proc && echo [0-9]*)
|
||||
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -10,6 +10,10 @@ _script_module()
|
|||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-o'|'--output-limit')
|
||||
COMPREPLY=( $(compgen -W "size" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
|
@ -25,6 +29,7 @@ _script_module()
|
|||
--flush
|
||||
--force
|
||||
--quiet
|
||||
--output-limit
|
||||
--timing=
|
||||
--version
|
||||
--help"
|
||||
|
|
|
@ -5,7 +5,7 @@ _scriptreplay_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-d'|'--divisor')
|
||||
'-d'|'--divisor'|'-m'|'--maxdelay')
|
||||
COMPREPLY=( $(compgen -W "digit" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
@ -18,6 +18,7 @@ _scriptreplay_module()
|
|||
OPTS="--timing
|
||||
--typescript
|
||||
--divisor
|
||||
--maxdelay
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
|
|
|
@ -11,7 +11,7 @@ _setsid_module()
|
|||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--ctty --help --version"
|
||||
OPTS="--ctty --wait --help --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -5,15 +5,37 @@ _sfdisk_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-u'|'--unit')
|
||||
COMPREPLY=( $(compgen -W "S C B M" -- $cur) )
|
||||
'-d'|'--dump'|'-J'|'--json'|'-l'|'--list'|'-F'|'--list-free'|'-r'|'--reorder'|'-s'|'--show-size'|'-V'|'--verify'|'-A'|'--activate'|'--delete')
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -dpnro name)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n'|'-C'|'--cylinders'|'-H'|'--heads'|'-S'|'--sectors')
|
||||
'-N'|'--partno')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-O'|'-I')
|
||||
'--color'|'-w'|'--wipe'|'-W'|'--wipe-partitions')
|
||||
COMPREPLY=( $(compgen -W "auto never always" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-o'|'--output')
|
||||
local prefix realcur OUTPUT_ALL OUTPUT
|
||||
realcur="${cur##*,}"
|
||||
prefix="${cur%$realcur}"
|
||||
OUTPUT_ALL="
|
||||
Attrs Boot Bsize Cpg Cylinders Device End
|
||||
End-C/H/S Flags Fsize Id Name Sectors Size
|
||||
Slice Start Start-C/H/S Type Type-UUID UUID
|
||||
"
|
||||
for WORD in $OUTPUT_ALL; do
|
||||
if ! [[ $prefix == *"$WORD"* ]]; then
|
||||
OUTPUT="$WORD ${OUTPUT:-""}"
|
||||
fi
|
||||
done
|
||||
compopt -o nospace
|
||||
COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- "$realcur") )
|
||||
return 0
|
||||
;;
|
||||
'-O'|'--backup-file')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
|
@ -28,47 +50,42 @@ _sfdisk_module()
|
|||
cur=${cur#=}
|
||||
;;
|
||||
-*)
|
||||
OPTS="--show-size
|
||||
--id
|
||||
--change-id
|
||||
--print-id
|
||||
--list
|
||||
OPTS="
|
||||
--activate
|
||||
--dump
|
||||
--increment
|
||||
--unit
|
||||
--one-only
|
||||
--list-types
|
||||
--DOS
|
||||
--DOS-extended
|
||||
--re-read
|
||||
-N
|
||||
-n
|
||||
-O
|
||||
-I
|
||||
--verify
|
||||
--version
|
||||
--help
|
||||
--force
|
||||
--no-reread
|
||||
--quiet
|
||||
--Linux
|
||||
--json
|
||||
--show-geometry
|
||||
--show-pt-geometry
|
||||
--activate=
|
||||
--unhide=
|
||||
--show-extended
|
||||
--leave-last
|
||||
--IBM
|
||||
--in-order
|
||||
--not-in-order
|
||||
--inside-outer
|
||||
--not-inside-outer
|
||||
--nested
|
||||
--chained
|
||||
--onesector
|
||||
--cylinders
|
||||
--heads
|
||||
--sectors"
|
||||
--list
|
||||
--list-free
|
||||
--reorder
|
||||
--show-size
|
||||
--list-types
|
||||
--verify
|
||||
--delete
|
||||
--part-label
|
||||
--part-type
|
||||
--part-uuid
|
||||
--part-attrs
|
||||
--append
|
||||
--backup
|
||||
--bytes
|
||||
--move-data
|
||||
--force
|
||||
--color
|
||||
--partno
|
||||
--no-act
|
||||
--no-reread
|
||||
--no-tell-kernel
|
||||
--backup-file
|
||||
--output
|
||||
--quiet
|
||||
--wipe
|
||||
--wipe-partitions
|
||||
--label
|
||||
--label-nested
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
_tailf_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-n'|'--lines')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--lines --version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _tailf_module tailf
|
|
@ -1,39 +0,0 @@
|
|||
_uuidd_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-p'|'--pid'|'-s'|'--socket')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-T'|'--timeout')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -W "timeout" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n'|'--uuids')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--pid --socket --timeout --kill --random --time --uuids --no-pid --no-fork --socket-activation --debug --quiet --version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _uuidd_module uuidd
|
|
@ -5,13 +5,31 @@ _uuidgen_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-n'|'--namespace')
|
||||
COMPREPLY=( $(compgen -W "@dns @url @oid @x500 @x.500" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
'-N'|'--name')
|
||||
COMPREPLY=( $(compgen -W "name" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--random --time --version --help"
|
||||
OPTS="
|
||||
--random
|
||||
--time
|
||||
--namespace
|
||||
--name
|
||||
--md5
|
||||
--sha1
|
||||
--hex
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
37
msys2/usr/share/bash-completion/completions/uuidparse
Normal file
37
msys2/usr/share/bash-completion/completions/uuidparse
Normal file
|
@ -0,0 +1,37 @@
|
|||
_uuidparse_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-o'|'--output')
|
||||
local prefix realcur OUTPUT
|
||||
realcur="${cur##*,}"
|
||||
prefix="${cur%$realcur}"
|
||||
for WORD in "UUID VARIANT TYPE TIME"; do
|
||||
if ! [[ $prefix == *"$WORD"* ]]; then
|
||||
OUTPUT="$WORD ${OUTPUT:-""}"
|
||||
fi
|
||||
done
|
||||
compopt -o nospace
|
||||
COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- $realcur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS="
|
||||
--json
|
||||
--noheadings
|
||||
--output
|
||||
--raw
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
|
||||
}
|
||||
complete -F _uuidparse_module uuidparse
|
|
@ -5,6 +5,20 @@ _wipefs_module()
|
|||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-O'|'--output')
|
||||
local prefix realcur OUTPUT_ALL OUTPUT
|
||||
realcur="${cur##*,}"
|
||||
prefix="${cur%$realcur}"
|
||||
OUTPUT_ALL="UUID LABEL LENGTH TYPE OFFSET USAGE DEVICE"
|
||||
for WORD in $OUTPUT_ALL; do
|
||||
if ! [[ $prefix == *"$WORD"* ]]; then
|
||||
OUTPUT="$WORD ${OUTPUT:-""}"
|
||||
fi
|
||||
done
|
||||
compopt -o nospace
|
||||
COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- $realcur) )
|
||||
return 0
|
||||
;;
|
||||
'-o'|'--offset')
|
||||
COMPREPLY=( $(compgen -W "offset" -- $cur) )
|
||||
return 0
|
||||
|
@ -21,7 +35,21 @@ _wipefs_module()
|
|||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--all --force --help --no-act --offset --parsable --quiet --types --version"
|
||||
OPTS="
|
||||
--all
|
||||
--backup
|
||||
--force
|
||||
--noheadings
|
||||
--json
|
||||
--no-act
|
||||
--offset
|
||||
--output
|
||||
--parsable
|
||||
--quiet
|
||||
--types
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue