summaryrefslogtreecommitdiffstats
path: root/completions/file
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--completions/file32
-rw-r--r--completions/file-roller42
-rw-r--r--completions/filefrag17
-rw-r--r--completions/filesnarf22
4 files changed, 113 insertions, 0 deletions
diff --git a/completions/file b/completions/file
new file mode 100644
index 0000000..21fbd16
--- /dev/null
+++ b/completions/file
@@ -0,0 +1,32 @@
+# file(1) completion -*- shell-script -*-
+
+_file()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ --help | --version | --separator | -!(-*)[vF])
+ return
+ ;;
+ --magic-file | --files-from | -!(-*)[mf])
+ _filedir
+ return
+ ;;
+ --exclude | -!(-*)e)
+ COMPREPLY=($(compgen -W 'apptype ascii cdf compress elf encoding
+ soft tar text tokens troff' -- "$cur"))
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ return
+ fi
+
+ _filedir
+} &&
+ complete -F _file file
+
+# ex: filetype=sh
diff --git a/completions/file-roller b/completions/file-roller
new file mode 100644
index 0000000..1d223fd
--- /dev/null
+++ b/completions/file-roller
@@ -0,0 +1,42 @@
+# file-roller(1) completion -*- shell-script -*-
+
+_file_roller()
+{
+ local cur prev words cword split
+ _init_completion -s || return
+
+ local exts='@(7z|ace|alz|ar|arj|[bglx]z|bz2|tb?(z)2|cab|cb[rz]|iso?(9660)|Z|t[abglx]z|cpio|deb|rar|?(g)tar|gem|lh[az]|lz[4h]|?(t)lrz|lzma|lzo|wim|swm|rpm|sit|zoo)'
+
+ case $prev in
+ --help | --help-all | --help-gtk | --help-sm-client | -!(-*)'?')
+ return
+ ;;
+ --sm-client-state-file)
+ _filedir
+ return
+ ;;
+ --add-to | -!(-*)a)
+ _filedir_xspec unzip
+ _filedir "$exts"
+ return
+ ;;
+ --extract-to | --default-dir | -!(-*)e)
+ _filedir -d
+ return
+ ;;
+ esac
+
+ $split && return
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=($(compgen -W '$(_parse_help "$1" --help-all)' -- "$cur"))
+ [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
+ return
+ fi
+
+ _filedir_xspec unzip
+ _filedir "$exts"
+} &&
+ complete -F _file_roller file-roller
+
+# ex: filetype=sh
diff --git a/completions/filefrag b/completions/filefrag
new file mode 100644
index 0000000..d26e8c8
--- /dev/null
+++ b/completions/filefrag
@@ -0,0 +1,17 @@
+# filefrag(8) completion -*- shell-script -*-
+
+_filefrag()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur"))
+ return
+ fi
+
+ _filedir
+} &&
+ complete -F _filefrag filefrag
+
+# ex: filetype=sh
diff --git a/completions/filesnarf b/completions/filesnarf
new file mode 100644
index 0000000..f959d80
--- /dev/null
+++ b/completions/filesnarf
@@ -0,0 +1,22 @@
+# filesnarf etc completion -*- shell-script -*-
+
+_snarf()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ -i)
+ _available_interfaces -a
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur"))
+ fi
+
+} &&
+ complete -F _snarf filesnarf mailsnarf msgsnarf
+
+# ex: filetype=sh