Added Cyg-Win
This commit is contained in:
parent
82cbc206eb
commit
413c315806
10586 changed files with 3806249 additions and 0 deletions
100
Agent-Windows/OGP64/usr/share/bash-completion/completions/blkid
Normal file
100
Agent-Windows/OGP64/usr/share/bash-completion/completions/blkid
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
_blkid_module()
|
||||
{
|
||||
local cur prev OPTS OUTPUT_ALL
|
||||
OUTPUT_ALL=''
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c'|'--cache-file')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-o'|'--output')
|
||||
COMPREPLY=( $(compgen -W "value device export full" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s'|'--match-tag')
|
||||
COMPREPLY=( $(compgen -W "tag" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-t'|'--match-token')
|
||||
COMPREPLY=( $(compgen -W "TYPE= LABEL= UUID=" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-L'|'--label')
|
||||
COMPREPLY=( $(compgen -W "$(cd /dev/disk/by-label/ 2>/dev/null && echo *)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-U'|'--uuid')
|
||||
COMPREPLY=( $(compgen -W "$(cd /dev/disk/by-uuid/ 2>/dev/null && echo *)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-S'|'--size')
|
||||
COMPREPLY=( $(compgen -W "size" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-O'|'--offset')
|
||||
COMPREPLY=( $(compgen -W "offset" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-u'|'--usages')
|
||||
OUTPUT_ALL={,no}{filesystem,raid,crypto,other}
|
||||
;;
|
||||
'-n'|'--match-types')
|
||||
OUTPUT_ALL="
|
||||
$(awk '{print $NF}' /proc/filesystems)
|
||||
$(\ls /lib/modules/$(uname -r)/kernel/fs)
|
||||
"
|
||||
;;
|
||||
'-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="
|
||||
--cache-file
|
||||
--no-encoding
|
||||
--garbage-collect
|
||||
--output
|
||||
--list-filesystems
|
||||
--match-tag
|
||||
--match-token
|
||||
--list-one
|
||||
--label
|
||||
--uuid
|
||||
--probe
|
||||
--info
|
||||
--size
|
||||
--offset
|
||||
--usages
|
||||
--match-types
|
||||
--no-part-details
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _blkid_module blkid
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
_cal_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS=" --one
|
||||
--three
|
||||
--months
|
||||
--sunday
|
||||
--span
|
||||
--monday
|
||||
--julian
|
||||
--year
|
||||
--twelve
|
||||
--week
|
||||
--color=auto
|
||||
--color=always
|
||||
--color=never
|
||||
--vertical
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _cal_module cal
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
_cfdisk_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
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
|
||||
;;
|
||||
'-V'|'--version'|'h'|'--help')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS=" --color
|
||||
--zero
|
||||
--lock
|
||||
--help
|
||||
--read-only
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _cfdisk_module cfdisk
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
_chrt_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
|
||||
;;
|
||||
'-T'|'--sched-runtime'|'-P'|'--sched-period'|'-D'|'--sched-deadline')
|
||||
COMPREPLY=( $(compgen -W "nanoseconds" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="
|
||||
--all-tasks
|
||||
--batch
|
||||
--deadline
|
||||
--fifo
|
||||
--help
|
||||
--idle
|
||||
--max
|
||||
--other
|
||||
--pid
|
||||
--reset-on-fork
|
||||
--rr
|
||||
--sched-deadline
|
||||
--sched-period
|
||||
--sched-runtime
|
||||
--verbose
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local i
|
||||
for i in ${COMP_WORDS[*]}; do
|
||||
case $i in
|
||||
'-p'|'--pid')
|
||||
COMPREPLY=( $(compgen -W "$(cd /proc && echo [0-9]*)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _chrt_module chrt
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
_col_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-l'|'--lines')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-H'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS="--no-backspaces
|
||||
--fine
|
||||
--pass
|
||||
--tabs
|
||||
--spaces
|
||||
--lines
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _col_module col
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
_colcrt_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=" --no-underlining
|
||||
--half-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 _colcrt_module colcrt
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
_colrm_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="--version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $COMP_CWORD in
|
||||
1)
|
||||
COMPREPLY=( $(compgen -W "startcol" -- $cur) )
|
||||
;;
|
||||
2)
|
||||
COMPREPLY=( $(compgen -W "endcol" -- $cur) )
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _colrm_module colrm
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
_column_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c'|'--output-width'|'-l'|'--table-columns-limit')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-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
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--columns
|
||||
--table
|
||||
--table-name
|
||||
--table-order
|
||||
--table-columns
|
||||
--table-columns-limit
|
||||
--table-noextreme
|
||||
--table-noheadings
|
||||
--table-maxout
|
||||
--table-header-repeat
|
||||
--table-hide
|
||||
--table-right
|
||||
--table-truncate
|
||||
--table-wrap
|
||||
--keep-empty-lines
|
||||
--json
|
||||
--tree
|
||||
--tree-id
|
||||
--tree-parent
|
||||
--output-width
|
||||
--separator
|
||||
--output-separator
|
||||
--fillrows
|
||||
--help
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _column_module column
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
_fallocate_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-o'|'--offset'|'-l'|'--length')
|
||||
COMPREPLY=( $(compgen -W "bytes" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="
|
||||
--collapse-range
|
||||
--dig-holes
|
||||
--insert-range
|
||||
--length
|
||||
--keep-size
|
||||
--offset
|
||||
--punch-hole
|
||||
--zero-range
|
||||
--posix
|
||||
--verbose
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _fallocate_module fallocate
|
||||
101
Agent-Windows/OGP64/usr/share/bash-completion/completions/fdisk
Normal file
101
Agent-Windows/OGP64/usr/share/bash-completion/completions/fdisk
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
_fdisk_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-s'|'--getsz')
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-b'|'--sector-size')
|
||||
COMPREPLY=( $(compgen -W "512 1024 2048 4096" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-c'|'--compatibility')
|
||||
COMPREPLY=( $(compgen -W "dos nondos" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-L'|'--color')
|
||||
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'|'--cylinders'|'-H'|'--heads'|'-S'|'--sectors')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-v'|'--version'|'-V'|'--list')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--sector-size
|
||||
--protect-boot
|
||||
--compatibility
|
||||
--color
|
||||
--list
|
||||
--list-details
|
||||
--noauto-pt
|
||||
--lock
|
||||
--output
|
||||
--type
|
||||
--units
|
||||
--getsz
|
||||
--bytes
|
||||
--wipe
|
||||
--wipe-partitions
|
||||
--cylinders
|
||||
--heads
|
||||
--sectors
|
||||
--help
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _fdisk_module fdisk
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
_flock_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-w'|'--timeout')
|
||||
COMPREPLY=( $(compgen -W "seconds" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-E'|'--conflict-exit-code')
|
||||
COMPREPLY=( $(compgen -W "{0..255}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-c'|'--command')
|
||||
compopt -o bashdefault
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--shared
|
||||
--exclusive
|
||||
--unlock
|
||||
--nonblock
|
||||
--timeout
|
||||
--conflict-exit-code
|
||||
--close
|
||||
--command
|
||||
--no-fork
|
||||
--help
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- ${cur:-"/"}) )
|
||||
return 0
|
||||
}
|
||||
complete -F _flock_module flock
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
_fsck.cramfs_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-b'|'--blocksize')
|
||||
COMPREPLY=( $(compgen -W "size" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'--extract')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $(compgen -W "--verbose --blocksize --extract --help --version" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _fsck.cramfs_module fsck.cramfs
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
_fsck.minix_module()
|
||||
{
|
||||
local cur OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--list --auto --repair --verbose --super --uncleared --force --help --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _fsck.minix_module fsck.minix
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
_getopt_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-l'|'--longoptions')
|
||||
COMPREPLY=( $(compgen -W "longopts" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n'|'--name')
|
||||
COMPREPLY=( $(compgen -W "name" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-o'|'--options')
|
||||
COMPREPLY=( $(compgen -W "optstring" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s'|'--shell')
|
||||
COMPREPLY=( $(compgen -W "sh bash csh tcsh" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--alternative --help --longoptions --name --options --quiet --quiet-output --shell --test --unquoted --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _getopt_module getopt
|
||||
4019
Agent-Windows/OGP64/usr/share/bash-completion/completions/git
Normal file
4019
Agent-Windows/OGP64/usr/share/bash-completion/completions/git
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,73 @@
|
|||
_hardlink_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-x'|'--exclude')
|
||||
COMPREPLY=( $(compgen -W "regex" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-i'|'--include')
|
||||
COMPREPLY=( $(compgen -W "regex" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s'|'--minimum-size')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-S'|'--maximum-size')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-b'|'--io-size')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-r'|'--cache-size')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-y'|'--method')
|
||||
COMPREPLY=( $(compgen -W "sha256 sha1 crc32c memcmp" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'--reflink')
|
||||
COMPREPLY=( $(compgen -W "never always auto" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-H'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="
|
||||
--content
|
||||
--respect-dir
|
||||
--respect-name
|
||||
--maximize
|
||||
--minimize
|
||||
--dry-run
|
||||
--ignore-owner
|
||||
--keep-oldest
|
||||
--ignore-mode
|
||||
--quiet
|
||||
--ignore-time
|
||||
--verbose
|
||||
--respect-xattrs
|
||||
--skip-reflinks
|
||||
--version
|
||||
--help
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -d -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _hardlink_module hardlink
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
_hexdump_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
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
|
||||
;;
|
||||
'-n'|'--length')
|
||||
COMPREPLY=( $(compgen -W "length" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s'|'--skip')
|
||||
COMPREPLY=( $(compgen -W "offset" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-V'|'--version'|'-h'|'--help')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS=" --one-byte-octal
|
||||
--one-byte-hex
|
||||
--one-byte-char
|
||||
--canonical
|
||||
--two-bytes-decimal
|
||||
--two-bytes-octal
|
||||
--two-bytes-hex
|
||||
--color=
|
||||
--format
|
||||
--format-file
|
||||
--length
|
||||
--skip
|
||||
--no-squeezing
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _hexdump_module hexdump
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
_isosize_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-d'|'--divisor')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
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
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
_lastlog2_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-b'|'--before')
|
||||
COMPREPLY=( $(compgen -W "days" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-t'|'--time')
|
||||
COMPREPLY=( $(compgen -W "days" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-i'|'--import')
|
||||
COMPREPLY=( $(compgen -W "file" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
'-r'|'--rename')
|
||||
COMPREPLY=( $(compgen -W "user_name" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
'-u'|'--user')
|
||||
COMPREPLY=( $(compgen -W "login" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
'-d'|'--database')
|
||||
COMPREPLY=( $(compgen -W "file" -- "$cur") )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="
|
||||
--before
|
||||
--clear
|
||||
--database
|
||||
--help
|
||||
--import
|
||||
--rename
|
||||
--service
|
||||
--set
|
||||
--time
|
||||
--user
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _lastlog2_module lastlog2
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
_logger_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-f'|'--file'|'--journald')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n'|'--server')
|
||||
COMPREPLY=( $(compgen -A hostname -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-P'|'--port')
|
||||
COMPREPLY=( $(compgen -W "$(awk '$1 ~ /^syslog$/ {split($2, a, "/"); print a[1]}' /etc/services)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-p'|'--priority')
|
||||
COMPREPLY=( $(compgen -W "{auth,authpriv,cron,daemon,ftp,lpr,mail,news,security}.{alert,crit,debug,emerg,err,error}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-t'|'--tag')
|
||||
COMPREPLY=( $(compgen -W "tag" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-u'|'--socket')
|
||||
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
|
||||
;;
|
||||
'--sd-id')
|
||||
COMPREPLY=( $(compgen -W "timeQuality origin meta" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="
|
||||
--file
|
||||
--help
|
||||
--id
|
||||
--journald
|
||||
--msgid
|
||||
--no-act
|
||||
--octet-count
|
||||
--port
|
||||
--prio-prefix
|
||||
--priority
|
||||
--rfc3164
|
||||
--rfc5424
|
||||
--sd-id
|
||||
--sd-param
|
||||
--server
|
||||
--size
|
||||
--skip-empty
|
||||
--socket
|
||||
--socket-errors
|
||||
--stderr
|
||||
--tag
|
||||
--tcp
|
||||
--udp
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _logger_module logger
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
_look_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-t'|'--terminate')
|
||||
COMPREPLY=( $(compgen -W "char" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--alternative --alphanum --ignore-case --terminate --version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
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
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
_mcookie_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-f'|'--file')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
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 --max-size --verbose --version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _mcookie_module mcookie
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
_mkfs_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-t'|'--type')
|
||||
FSTYPES=$(for I in /sbin/mkfs.* /usr/sbin/mkfs.*; do if [ -e $I ]; then echo ${I##*mkfs.}; fi; done)
|
||||
COMPREPLY=( $(compgen -W "$FSTYPES" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS='--type --verbose --help --version'
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _mkfs_module mkfs
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
_mkfs.bfs_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-N'|'--inodes')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-V'|'--vname'|'-F'|'--fname')
|
||||
COMPREPLY=( $(compgen -W "name" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS='--inodes --vname --fname --verbose --help --version'
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _mkfs.bfs_module mkfs.bfs
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
_mkfs.cramfs_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-b')
|
||||
COMPREPLY=( $(compgen -W "blksize" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-e')
|
||||
COMPREPLY=( $(compgen -W "edition" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-N')
|
||||
COMPREPLY=( $(compgen -W "big little host" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-i')
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n')
|
||||
COMPREPLY=( $(compgen -W "name" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'-V')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="-h -v -E -b -e -N -i -n -p -s -z"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _mkfs.cramfs_module mkfs.cramfs
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
_mkfs.minix_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-i'|'--inodes')
|
||||
COMPREPLY=( $(compgen -W "inodes" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-l'|'--badblocks')
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n'|'--namelength')
|
||||
COMPREPLY=( $(compgen -W "14 30 60" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--namelength --inodes --check --badblocks --help --version -1 -2 -3"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _mkfs.minix_module mkfs.minix
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
_mkswap_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-p'|'--pagesize')
|
||||
COMPREPLY=( $(compgen -W "bytes" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-L'|'--label')
|
||||
COMPREPLY=( $(compgen -W "label" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-v'|'--swapversion')
|
||||
COMPREPLY=( $(compgen -W "1" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-U'|'--uuid')
|
||||
COMPREPLY=( $(compgen -W "$(uuidgen -r)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-o'|'--offset')
|
||||
COMPREPLY=( $(compgen -W "bytes" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-s'|'--size')
|
||||
COMPREPLY=( $(compgen -W "bytes" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--check --force --pagesize --lock --label --swapversion --uuid --offset --verbose --version --help --size --file"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _mkswap_module mkswap
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
_more_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="
|
||||
--silent
|
||||
--logical
|
||||
--no-pause
|
||||
--print-over
|
||||
--clean-print
|
||||
--squeeze
|
||||
--plain
|
||||
--lines
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
+*)
|
||||
OPTS="+number +/pattern"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _more_module more
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
_namei_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="--help --version --mountpoints --modes --owners --long --nosymlinks --vertical"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _namei_module namei
|
||||
33
Agent-Windows/OGP64/usr/share/bash-completion/completions/pg
Normal file
33
Agent-Windows/OGP64/usr/share/bash-completion/completions/pg
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
_pg_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-p')
|
||||
COMPREPLY=( $(compgen -W "prompt" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'-V')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="-number -c -e -f -n -p -r -s -h -V"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
+*)
|
||||
OPTS="+number +/pattern/"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _pg_module pg
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
_rename_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="--verbose --symlink --help --version --no-act --all --last --no-overwrite --interactive"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $COMP_CWORD in
|
||||
1)
|
||||
COMPREPLY=( $(compgen -W "expression" -- $cur) )
|
||||
;;
|
||||
2)
|
||||
COMPREPLY=( $(compgen -W "replacement" -- $cur) )
|
||||
;;
|
||||
*)
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _rename_module rename
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
_renice_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-g'|'--pgrp')
|
||||
local PGRP
|
||||
PGRP=$(ps -ax -opgrp | sed '1d')
|
||||
COMPREPLY=( $(compgen -W "$PGRP" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-n'|'--priority')
|
||||
COMPREPLY=( $(compgen -W "{-20..20}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-p'|'--pid')
|
||||
local PIDS
|
||||
PIDS=$(cd /proc && echo [0-9]*)
|
||||
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-u'|'--user')
|
||||
COMPREPLY=( $(compgen -u -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
OPTS="--pgrp
|
||||
--priority
|
||||
--pid
|
||||
--user
|
||||
--help
|
||||
--version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _renice_module renice
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
_rev_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="--version --help --zero"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _rev_module rev
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
_script_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c'|'--command')
|
||||
compopt -o bashdefault
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-E'|'--echo')
|
||||
COMPREPLY=( $(compgen -W "auto always never" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-o'|'--output-limit')
|
||||
COMPREPLY=( $(compgen -W "size" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-m'|'--logging-format')
|
||||
COMPREPLY=( $(compgen -W "classic advanced" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
'=')
|
||||
cur=${cur#=}
|
||||
;;
|
||||
-*)
|
||||
OPTS="--append
|
||||
--command
|
||||
--echo
|
||||
--log-in
|
||||
--log-out
|
||||
--log-io
|
||||
--log-timing
|
||||
--logging-format
|
||||
--return
|
||||
--flush
|
||||
--force
|
||||
--quiet
|
||||
--output-limit
|
||||
--timing=
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _script_module script
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
_scriptlive_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c'|'--command')
|
||||
compopt -o bashdefault
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-d'|'--divisor'|'-m'|'--maxdelay')
|
||||
COMPREPLY=( $(compgen -W "digit" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--timing
|
||||
--log-in
|
||||
--log-io
|
||||
--log-timing
|
||||
--command
|
||||
--divisor
|
||||
--maxdelay
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _scriptlive_module scriptlive
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
_scriptreplay_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c'|'--cr-mode')
|
||||
COMPREPLY=( $(compgen -W "auto never always" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-d'|'--divisor'|'-m'|'--maxdelay')
|
||||
COMPREPLY=( $(compgen -W "digit" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-x'|'--stream')
|
||||
COMPREPLY=( $(compgen -W "out in signal info" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--timing
|
||||
--log-in
|
||||
--log-out
|
||||
--log-io
|
||||
--log-timing
|
||||
--summary
|
||||
--stream
|
||||
--cr-mode
|
||||
--typescript
|
||||
--divisor
|
||||
--maxdelay
|
||||
--version
|
||||
--help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _scriptreplay_module scriptreplay
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
_setpgid_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="--foreground --help --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _setpgid_module setpgid
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
_setsid_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="--ctty --wait --help --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _setsid_module setsid
|
||||
102
Agent-Windows/OGP64/usr/share/bash-completion/completions/sfdisk
Normal file
102
Agent-Windows/OGP64/usr/share/bash-completion/completions/sfdisk
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
_sfdisk_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-d'|'--dump'|'-J'|'--json'|'-l'|'--list'|'-F'|'--list-free'|'-r'|'--reorder'|'-s'|'--show-size'|'-V'|'--verify'|'-A'|'--activate'|'--delete')
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -dpnro name)" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-N'|'--partno')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'--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) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-v'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
'=')
|
||||
cur=${cur#=}
|
||||
;;
|
||||
-*)
|
||||
OPTS="
|
||||
--activate
|
||||
--dump
|
||||
--json
|
||||
--show-geometry
|
||||
--list
|
||||
--list-free
|
||||
--disk-id
|
||||
--reorder
|
||||
--show-size
|
||||
--list-types
|
||||
--verify
|
||||
--relocate
|
||||
--delete
|
||||
--part-label
|
||||
--part-type
|
||||
--part-uuid
|
||||
--part-attrs
|
||||
--append
|
||||
--backup
|
||||
--backup-pt-sectors
|
||||
--bytes
|
||||
--move-data
|
||||
--force
|
||||
--color
|
||||
--lock
|
||||
--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
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _sfdisk_module sfdisk
|
||||
1656
Agent-Windows/OGP64/usr/share/bash-completion/completions/svn
Normal file
1656
Agent-Windows/OGP64/usr/share/bash-completion/completions/svn
Normal file
File diff suppressed because it is too large
Load diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,32 @@
|
|||
_swaplabel_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-L'|'--label')
|
||||
COMPREPLY=( $(compgen -W "label" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-U'|'--uuid')
|
||||
COMPREPLY=( $(compgen -W '$(uuidgen)' -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--label --uuid --help --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _swaplabel_module swaplabel
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
_taskset_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-c'|'--cpu-list')
|
||||
local prefix realcur CPULIST_ALL CPULIST
|
||||
realcur="${cur##*,}"
|
||||
prefix="${cur%$realcur}"
|
||||
CPULIST_ALL=$(sed 's/^/{/; s/-/../g; s/,/} {/g; s/$/}/' /sys/devices/system/cpu/online)
|
||||
for WORD in $(eval echo $CPULIST_ALL); do
|
||||
if ! [[ $prefix == *"$WORD"* ]]; then
|
||||
CPULIST="$WORD ${CPULIST:-""}"
|
||||
fi
|
||||
done
|
||||
compopt -o nospace
|
||||
COMPREPLY=( $(compgen -P "$prefix" -W "$CPULIST" -S ',' -- $realcur) )
|
||||
return 0
|
||||
;;
|
||||
'-p'|'--pid')
|
||||
local PIDS
|
||||
# FIXME: the pid argument is ambiguous. When
|
||||
# setting an affinity the optarg has to be cpu
|
||||
# mask. The following is good only for getting
|
||||
# affinity.
|
||||
PIDS=$(cd /proc && echo [0-9]*)
|
||||
COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--all-tasks --pid --cpu-list --help --version"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _taskset_module taskset
|
||||
33
Agent-Windows/OGP64/usr/share/bash-completion/completions/ul
Normal file
33
Agent-Windows/OGP64/usr/share/bash-completion/completions/ul
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
_ul_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-t'|'--terminal')
|
||||
local TERM_LIST I
|
||||
TERM_LIST=''
|
||||
for I in /usr/share/terminfo/?/*; do
|
||||
TERM_LIST+="${I##*/} "
|
||||
done
|
||||
COMPREPLY=( $(compgen -W "$TERM_LIST" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="--terminal --indicated --version --help"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -f -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _ul_module ul
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
_uuidgen_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
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
|
||||
;;
|
||||
'-C'|'--count')
|
||||
COMPREPLY=( $(compgen -W "number" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="
|
||||
--random
|
||||
--time
|
||||
--namespace
|
||||
--name
|
||||
--md5
|
||||
--count
|
||||
--sha1
|
||||
--hex
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
complete -F _uuidgen_module uuidgen
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
_whereis_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-B'|'-M'|'-S')
|
||||
local IFS=$'\n'
|
||||
compopt -o filenames
|
||||
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'-V')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="-b -B -m -M -s -S -f -u -l -g"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -c -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _whereis_module whereis
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
_wipefs_module()
|
||||
{
|
||||
local cur prev OPTS
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
case $prev in
|
||||
'-b'|'--backup')
|
||||
COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
|
||||
return 0
|
||||
;;
|
||||
'-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
|
||||
;;
|
||||
'-t'|'--types')
|
||||
local TYPES
|
||||
TYPES="$(blkid -k)"
|
||||
COMPREPLY=( $(compgen -W "$TYPES" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
'-h'|'--help'|'-V'|'--version')
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
case $cur in
|
||||
-*)
|
||||
OPTS="
|
||||
--all
|
||||
--backup
|
||||
--force
|
||||
--noheadings
|
||||
--json
|
||||
--lock
|
||||
--no-act
|
||||
--offset
|
||||
--output
|
||||
--parsable
|
||||
--quiet
|
||||
--types
|
||||
--help
|
||||
--version
|
||||
"
|
||||
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
compopt -o bashdefault -o default
|
||||
COMPREPLY=( $(compgen -W "$(lsblk -pnro name)" -- $cur) )
|
||||
return 0
|
||||
}
|
||||
complete -F _wipefs_module wipefs
|
||||
Loading…
Add table
Add a link
Reference in a new issue