-# mtx completion by Jon Middleton <jjm@ixtab.org.uk>
+# -*- 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 <jjm@ixtab.org.uk>
_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 \
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
}
+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 <bdale@gag.com> Mon, 06 Apr 2009 10:20:08 -0600
+
mtx (1.3.12-1) unstable; urgency=low
* new upstream version, closes: #500590
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
dh_installexamples contrib/*
dh_installmenu
dh_installcron
-# dh_installman
+ dh_bash-completion
dh_installinfo
dh_installchangelogs CHANGES
dh_link