summaryrefslogtreecommitdiff
path: root/completions/lzop
diff options
context:
space:
mode:
authorGuillaume Rousse <Guillaume.Rousse@inria.fr>2010-09-12 16:42:21 +0200
committerGuillaume Rousse <Guillaume.Rousse@inria.fr>2010-09-12 16:42:21 +0200
commitcb7fc2f7c4a4c7c5a665c5bf8b73b40fc5e268a9 (patch)
treeb38d03d1a861820cb2985f73acb2724605d2f1b0 /completions/lzop
parent276e3a780ec48fe1577c45e73d62bc68c70b1c00 (diff)
downloadbash-completion-cb7fc2f7c4a4c7c5a665c5bf8b73b40fc5e268a9.tar.gz
rename 'contrib' directory to 'completions'
Diffstat (limited to 'completions/lzop')
-rw-r--r--completions/lzop68
1 files changed, 68 insertions, 0 deletions
diff --git a/completions/lzop b/completions/lzop
new file mode 100644
index 00000000..19852b24
--- /dev/null
+++ b/completions/lzop
@@ -0,0 +1,68 @@
+# lzop(1) completion
+
+have lzop &&
+_lzop()
+{
+ local cur prev xspec
+
+ COMPREPLY=()
+ _get_comp_words_by_ref cur prev
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-1 -2 -3 -4 -5 -6 -7 -8 -9 -P \
+ --fast --best --decompress --extract --test --list --ls --info \
+ --sysinfo --license --help --version --stdout --output --path \
+ --force --no-checksum --no-name --name --no-mode --no-time \
+ --suffix --keep --delete --crc32 --no-warn --ignore-warn --quiet \
+ --verbose --no-stdin --filter --checksum --no-color --mono \
+ --color' -- "$cur" ) )
+ return 0
+ fi
+
+ case $prev in
+ -o|--output)
+ _filedir
+ return 0
+ ;;
+ --path)
+ _filedir -d
+ return 0
+ ;;
+ -S|--suffix)
+ return 0
+ ;;
+ esac
+
+ xspec="*.?(t)lzo"
+ case $prev in
+ --decompress|--uncompress|--extract|--list|--ls|--info|--test)
+ xspec="!"$xspec
+ ;;
+ --force)
+ xspec=
+ ;;
+ --*)
+ ;;
+ -*f*|'<'|'>')
+ xspec=
+ ;;
+ -*[dltx]*)
+ xspec="!"$xspec
+ ;;
+ esac
+
+ _expand || return 0
+
+ local IFS=$'\t\n'
+ COMPREPLY=( $( compgen -f -X "$xspec" -- "$cur" ) \
+ $( compgen -d -- "$cur" ) )
+} &&
+complete -F _lzop -o filenames lzop
+
+# Local variables:
+# mode: shell-script
+# sh-basic-offset: 4
+# sh-indent-comment: t
+# indent-tabs-mode: nil
+# End:
+# ex: ts=4 sw=4 et filetype=sh