Install man page; add configuration and bash-completion file

This commit is contained in:
Bastian Kleineidam 2010-02-21 17:50:52 +01:00
parent 8a3d685e3b
commit 138bf8805a
3 changed files with 66 additions and 0 deletions

55
patool.bash-completion Normal file
View File

@ -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
}

8
patool.conf Normal file
View File

@ -0,0 +1,8 @@
; global defaults
[DEFAULTS]
verbose=0
force=0
; always extract ZIP files with unzip
;[zip]
;extract=unzip

View File

@ -40,5 +40,8 @@ setup (
maintainer_email = MyEmail, maintainer_email = MyEmail,
license = "GPL", license = "GPL",
packages = ['patoolib', 'patoolib.programs'], packages = ['patoolib', 'patoolib.programs'],
data_files = [
('share/man/man1', ['doc/patool.1']),
],
scripts = ['patool'], scripts = ['patool'],
) )