[Bash-completion-commits] [SCM] bash-completion branch, master, updated. acef9e78e3e5417e6862faaca0de389c2287c944
Guillaume Rousse
guillomovitch at zarb.org
Mon Jun 8 14:54:32 UTC 2009
The following commit has been merged in the master branch:
commit acef9e78e3e5417e6862faaca0de389c2287c944
Author: Guillaume Rousse <guillomovitch at zarb.org>
Date: Mon Jun 8 16:55:03 2009 +0200
split cancel completion
diff --git a/Makefile.am b/Makefile.am
index 168cb38..1922c6a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,6 +26,7 @@ bashcomp_DATA = contrib/ant \
contrib/cowsay \
contrib/cpan2dist \
contrib/cpio \
+ contrib/cups \
contrib/cvs \
contrib/dcop \
contrib/dd \
diff --git a/bash_completion b/bash_completion
index d8db11f..0ee070f 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1536,20 +1536,6 @@ _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
#
have id &&
diff --git a/contrib/sysctl b/contrib/cups
similarity index 51%
copy from contrib/sysctl
copy to contrib/cups
index 516fcc1..9e0dbf1 100644
--- a/contrib/sysctl
+++ b/contrib/cups
@@ -1,18 +1,16 @@
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
-# bash completion for sysctl
+# bash completion for cups
-have sysctl &&
-_sysctl()
+have cancel &&
+_cancel()
{
local cur
COMPREPLY=()
cur=`_get_cword`
- COMPREPLY=( $( compgen -W "$(sysctl -N -a 2>/dev/null)" -- $cur ) )
-
- return 0
+ COMPREPLY=( $( compgen -W "$( lpstat | cut -d' ' -f1 )" -- $cur ) )
} &&
-complete -F _sysctl sysctl
+complete -F _cancel $filenames cancel
--
bash-completion
More information about the Bash-completion-commits
mailing list