From: Bdale Garbee Date: Mon, 6 Apr 2009 16:24:37 +0000 (-0700) Subject: improve bash completions and related delivery mechanism X-Git-Tag: debian/1.3.12-2~4 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=62da9e745b7aad45f2bed9ea207419dd1aa60bbf;p=debian%2Fmtx improve bash completions and related delivery mechanism --- diff --git a/debian/bash_completion b/debian/bash_completion index 71852c0..fc4a265 100644 --- a/debian/bash_completion +++ b/debian/bash_completion @@ -1,13 +1,14 @@ -# mtx completion by Jon Middleton +# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*- +# ex: ts=8 sw=8 noet filetype=sh # -# $Id: bash_completion,v 1.1 2004-02-15 05:43:25 bdale Exp $ +# mtx completion by Jon Middleton _mtx() { local cur prev options tapes drives COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} + cur=`_get_cword` prev=${COMP_WORDS[COMP_CWORD-1]} options="-f nobarcode invert noattach --version inquiry noattach \ @@ -25,20 +26,17 @@ _mtx() if [ $COMP_CWORD -gt 1 ]; then case $prev in load) - COMPREPLY=( $( compgen -W "$tapes" -- $cur ) ) + COMPREPLY=( $( compgen -W "$tapes" -- "$cur" ) ) ;; - unload|first|last|next) - COMPREPLY=( $( compgen -W "$drives" -- $cur ) ) - ;; - -f) - true + @(unload|first|last|next)) + COMPREPLY=( $( compgen -W "$drives" -- "$cur" ) ) ;; *) true ;; esac else - COMPREPLY=( $( compgen -W "$options" -- $cur ) ) + COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) fi return 0 } diff --git a/debian/changelog b/debian/changelog index db4c6fd..448de17 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mtx (1.3.12-2) unstable; urgency=low + + * patch from David Paleino to improve bash completions, closes: #522739 + * switch to using dh_bash-completion + + -- Bdale Garbee Mon, 06 Apr 2009 10:20:08 -0600 + mtx (1.3.12-1) unstable; urgency=low * new upstream version, closes: #500590 diff --git a/debian/rules b/debian/rules index 9d73953..cf4aa4c 100755 --- a/debian/rules +++ b/debian/rules @@ -35,8 +35,6 @@ install: build make install bindir=`pwd`/debian/mtx/bin prefix=`pwd`/debian/mtx/usr \ mandir=`pwd`/debian/mtx/usr/share/man - install -o root -g root -m 0644 debian/bash_completion \ - debian/mtx/etc/bash_completion.d/mtx # Build architecture-independent files here. binary-indep: build install @@ -49,7 +47,7 @@ binary-arch: build install dh_installexamples contrib/* dh_installmenu dh_installcron -# dh_installman + dh_bash-completion dh_installinfo dh_installchangelogs CHANGES dh_link