split cancel completion

This commit is contained in:
Guillaume Rousse 2009-06-08 16:55:03 +02:00
parent 7522b94f33
commit acef9e78e3
3 changed files with 17 additions and 14 deletions

View File

@ -26,6 +26,7 @@ bashcomp_DATA = contrib/ant \
contrib/cowsay \ contrib/cowsay \
contrib/cpan2dist \ contrib/cpan2dist \
contrib/cpio \ contrib/cpio \
contrib/cups \
contrib/cvs \ contrib/cvs \
contrib/dcop \ contrib/dcop \
contrib/dd \ contrib/dd \

View File

@ -1536,20 +1536,6 @@ _look()
} && } &&
complete -F _look $default look complete -F _look $default look
# CUPS cancel(1) completion
#
have cancel &&
_cancel()
{
local cur
COMPREPLY=()
cur=`_get_cword`
COMPREPLY=( $( compgen -W "$( lpstat | cut -d' ' -f1 )" -- $cur ) )
} &&
complete -F _cancel $filenames cancel
# id(1) completion # id(1) completion
# #
have id && have id &&

16
contrib/cups Normal file
View File

@ -0,0 +1,16 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# bash completion for cups
have cancel &&
_cancel()
{
local cur
COMPREPLY=()
cur=`_get_cword`
COMPREPLY=( $( compgen -W "$( lpstat | cut -d' ' -f1 )" -- $cur ) )
} &&
complete -F _cancel $filenames cancel