From 138bf8805a0704c0aa31991804027e2c70d5b106 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Sun, 21 Feb 2010 17:50:52 +0100 Subject: [PATCH] Install man page; add configuration and bash-completion file --- patool.bash-completion | 55 ++++++++++++++++++++++++++++++++++++++++++ patool.conf | 8 ++++++ setup.py | 3 +++ 3 files changed, 66 insertions(+) create mode 100644 patool.bash-completion create mode 100644 patool.conf diff --git a/patool.bash-completion b/patool.bash-completion new file mode 100644 index 0000000..ea3269c --- /dev/null +++ b/patool.bash-completion @@ -0,0 +1,55 @@ +# patool completion +# +have patool && +{ +_patool() +{ + local cur prev commands options command + + COMPREPLY=() + cur=`_get_cword` + + commands='extract list test create formats' + + if [[ $COMP_CWORD -eq 1 ]] ; then + if [[ "$cur" == -* ]]; then + COMPREPLY=( $( compgen -W '--help' -- $cur ) ) + else + COMPREPLY=( $( compgen -W "$commands" -- $cur ) ) + fi + else + + command=${COMP_WORDS[1]} + + if [[ "$cur" == -* ]]; then + # possible options for the command + case $command in + extract) + options='--verbose --force' + ;; + list) + options='--verbose' + ;; + test) + options='--verbose' + ;; + create) + options='--verbose --force' + ;; + formats) + options='' + ;; + esac + options="$options --help" + + COMPREPLY=( $( compgen -W "$options" -- $cur ) ) + else + _filedir + fi + fi + + return 0 +} +complete -F _patool $filenames patool + +} diff --git a/patool.conf b/patool.conf new file mode 100644 index 0000000..1c917d4 --- /dev/null +++ b/patool.conf @@ -0,0 +1,8 @@ +; global defaults +[DEFAULTS] +verbose=0 +force=0 + +; always extract ZIP files with unzip +;[zip] +;extract=unzip diff --git a/setup.py b/setup.py index 4fa81aa..cf9ba4d 100644 --- a/setup.py +++ b/setup.py @@ -40,5 +40,8 @@ setup ( maintainer_email = MyEmail, license = "GPL", packages = ['patoolib', 'patoolib.programs'], + data_files = [ + ('share/man/man1', ['doc/patool.1']), + ], scripts = ['patool'], )