mirror of
https://github.com/MacPaw/XADMaster.git
synced 2025-08-29 19:43:47 +02:00
23 lines
671 B
Text
23 lines
671 B
Text
__unar()
|
|
{
|
|
local cur prev opts
|
|
COMPREPLY=()
|
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
opts="--output-directory --force-overwrite --force-rename --force-skip \
|
|
--force-directory --no-directory --password --encoding \
|
|
--password-encoding --indexes --no-recursion --copy-time \
|
|
--no-quarantine --forks --quiet --help --version"
|
|
if [[ ${prev} == "--forks" ]] ; then
|
|
local forksopts
|
|
forksopts="fork visible hidden skip"
|
|
COMPREPLY=( $(compgen -W "${forksopts}" -- ${cur}) )
|
|
return 0
|
|
elif [[ ${cur} == -* ]] ; then
|
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
|
return 0
|
|
fi
|
|
}
|
|
|
|
complete -o bashdefault -A file -F __unar unar
|
|
|