summaryrefslogtreecommitdiff
path: root/system/unar/Extra/unar.bash_completion
diff options
context:
space:
mode:
Diffstat (limited to 'system/unar/Extra/unar.bash_completion')
-rw-r--r--system/unar/Extra/unar.bash_completion23
1 files changed, 23 insertions, 0 deletions
diff --git a/system/unar/Extra/unar.bash_completion b/system/unar/Extra/unar.bash_completion
new file mode 100644
index 0000000000..06fe66f567
--- /dev/null
+++ b/system/unar/Extra/unar.bash_completion
@@ -0,0 +1,23 @@
+__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
+