[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-57-g9af6f35

Ville Skyttä ville.skytta at iki.fi
Mon Apr 4 21:38:56 UTC 2011


The following commit has been merged in the master branch:
commit 9af6f3504e8c94e5ead187b7cd223bd481548957
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Apr 5 00:35:51 2011 +0300

    Abort completion file loading earlier if required commands are not available.
    
    Cuts ~10% from bash completion load time on two different systems I
    just tested.

diff --git a/CHANGES b/CHANGES
index f30e352..52bbee5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,7 @@ bash-completion (2.x)
   * Drop rpm query support for rpm < 4.1.
   * Split rpm and rpmbuild completions and improve them both.
   * Add $_backup_glob for matching various backup files.
+  * Load speedups.
 
   [ Guillaume Rousse ]
   * added puppet completion, using work from Mathieu Parent (sathieudebian.org)
diff --git a/completions/_mock b/completions/_mock
index fa31271..f7512ef 100644
--- a/completions/_mock
+++ b/completions/_mock
@@ -3,7 +3,8 @@
 
 # bash completion for mock
 
-have mock &&
+have mock || return
+
 _mock()
 {
     local cur prev plugins cfgdir split=false
diff --git a/completions/_modules b/completions/_modules
index 77a5945..941ab81 100644
--- a/completions/_modules
+++ b/completions/_modules
@@ -19,7 +19,7 @@
 
 # Test for existence of /etc/profile.d/modules.sh too because we may end up
 # being sourced before it and thus before the `module' alias has been defined.
-[ -f /etc/profile.d/modules.sh ] || have module && {
+[ -f /etc/profile.d/modules.sh ] || have module || return
 
 _module_list ()
 {
@@ -81,7 +81,6 @@ _module ()
     return 0
 } &&
 complete -F _module -o default module
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/_subversion b/completions/_subversion
index 0d76d69..753831a 100644
--- a/completions/_subversion
+++ b/completions/_subversion
@@ -3,8 +3,8 @@
 
 # svn completion
 
-have svn &&
-{
+have svn || return
+
 _svn()
 {
     local cur prev commands options command
@@ -349,7 +349,6 @@ _svnlook()
     return 0
 } &&
 complete -F _svnlook -o default svnlook
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/_yum b/completions/_yum
index 9d3cbb6..5c95dd8 100644
--- a/completions/_yum
+++ b/completions/_yum
@@ -3,7 +3,8 @@
 
 # yum(8) completion
 
-have yum && {
+have yum || return
+
 _yum_list()
 {
     if [[ "$1" == all ]] ; then
@@ -144,7 +145,6 @@ _yum()
             --skip-broken --color' -- $cur ) )
         return 0
     fi
-}
 } &&
 complete -F _yum yum
 
diff --git a/completions/_yum-utils b/completions/_yum-utils
index b7f6d26..990e6bc 100644
--- a/completions/_yum-utils
+++ b/completions/_yum-utils
@@ -3,7 +3,8 @@
 
 # bash completion for repomanage
 
-have repomanage &&
+have repomanage || return
+
 _repomanage()
 {
     local cur prev
diff --git a/completions/abook b/completions/abook
index f09c8b5..37663b7 100644
--- a/completions/abook
+++ b/completions/abook
@@ -1,6 +1,7 @@
 # abook(1) completion
 
-have abook &&
+have abook || return
+
 _abook()
 {
     local cur prev
diff --git a/completions/ant b/completions/ant
index c406c01..7102ace 100644
--- a/completions/ant
+++ b/completions/ant
@@ -1,7 +1,7 @@
 # bash completion for ant
 
-have ant &&
-{
+have ant || return
+
 _ant()
 {
     local cur prev buildfile i
@@ -59,7 +59,6 @@ _ant()
 } &&
 have complete-ant-cmd.pl && \
      complete -C complete-ant-cmd.pl -F _ant ant || complete -F _ant ant
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/apache2ctl b/completions/apache2ctl
index c2e16de..1a473f8 100644
--- a/completions/apache2ctl
+++ b/completions/apache2ctl
@@ -1,6 +1,7 @@
 # apache2ctl(1) completion
 
-have apache2ctl && {
+have apache2ctl || return
+
 _apache2ctl()
 {
     local APWORDS cur
@@ -14,7 +15,6 @@ _apache2ctl()
     COMPREPLY=( $( compgen -W "$APWORDS" -- "$cur" ) )
 } &&
 complete -F _apache2ctl apache2ctl
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/apt-build b/completions/apt-build
index d875a98..0f611e5 100644
--- a/completions/apt-build
+++ b/completions/apt-build
@@ -1,6 +1,7 @@
 # Debian apt-build(1) completion.
 
-have apt-build &&
+have apt-build || return
+
 _apt_build()
 {
     local cur prev special i
diff --git a/completions/aptitude b/completions/aptitude
index d04bd35..d66ed6e 100644
--- a/completions/aptitude
+++ b/completions/aptitude
@@ -1,6 +1,7 @@
 # Debian aptitude(1) completion
 
-have aptitude && {
+have aptitude || return
+
 have grep-status && {
 _comp_dpkg_hold_packages()
 {
@@ -87,7 +88,6 @@ _aptitude()
     return 0
 } &&
 complete -F _aptitude -o default aptitude
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/aspell b/completions/aspell
index 88e7336..491967e 100644
--- a/completions/aspell
+++ b/completions/aspell
@@ -1,6 +1,7 @@
 # bash completion for aspell
 
-have aspell && {
+have aspell || return
+
 _aspell_dictionary()
 {
     local datadir
@@ -90,7 +91,6 @@ _aspell()
     fi
 } &&
 complete -F _aspell aspell
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/autorpm b/completions/autorpm
index 6a5f762..7f19221 100644
--- a/completions/autorpm
+++ b/completions/autorpm
@@ -1,6 +1,7 @@
 # autorpm(8) completion
 
-have autorpm &&
+have autorpm || return
+
 _autorpm()
 {
     local cur
diff --git a/completions/bind-utils b/completions/bind-utils
index 040d197..aef40d9 100644
--- a/completions/bind-utils
+++ b/completions/bind-utils
@@ -1,6 +1,7 @@
 # bash completion for nslookup
 
-have nslookup &&
+have nslookup || return
+
 _nslookup()
 {
     local cur
diff --git a/completions/bitkeeper b/completions/bitkeeper
index 79436a0..8d70cf1 100644
--- a/completions/bitkeeper
+++ b/completions/bitkeeper
@@ -1,6 +1,7 @@
 # BitKeeper completion adapted from code by  Bart Trojanowski <bart at jukie.net>
 
-have bk &&
+have bk || return
+
 _bk()
 {
     local BKCMDS
diff --git a/completions/bittorrent b/completions/bittorrent
index d40b90d..de303c2 100644
--- a/completions/bittorrent
+++ b/completions/bittorrent
@@ -1,7 +1,8 @@
 # btdownloadheadless(1) completion
 
 have btdownloadheadless.py || have btdownloadcurses.py || \
-have btdownloadgui.py &&
+    have btdownloadgui.py || return
+
 _btdownload()
 {
     local cur prev
diff --git a/completions/bluez b/completions/bluez
index f547cae..029d67b 100644
--- a/completions/bluez
+++ b/completions/bluez
@@ -1,6 +1,7 @@
 # bash completion for bluez utils
 
-have hcitool && {
+have hcitool || return
+
 _bluetooth_adresses()
 {
     if [ -n "${COMP_BLUETOOTH_SCAN:-}" ]; then
@@ -419,7 +420,6 @@ _avctrl()
     fi
 } &&
 complete -F _avctrl avctrl
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/brctl b/completions/brctl
index 1be86af..6b08757 100644
--- a/completions/brctl
+++ b/completions/brctl
@@ -1,6 +1,7 @@
 # bash completion for brctl
 
-have brctl &&
+have brctl || return
+
 _brctl()
 {
     local cur command
diff --git a/completions/bzip2 b/completions/bzip2
index 7e2f9fd..51026c5 100644
--- a/completions/bzip2
+++ b/completions/bzip2
@@ -1,6 +1,7 @@
 # bash completion for bzip2
 
-have bzip2 || have pbzip2 &&
+have bzip2 || have pbzip2 || return
+
 _bzip2()
 {
     local cur prev xspec helpopts
diff --git a/completions/cardctl b/completions/cardctl
index 1af7491..9d817e2 100644
--- a/completions/cardctl
+++ b/completions/cardctl
@@ -1,6 +1,7 @@
 # Linux cardctl(8) completion
 
-have cardctl || have pccardctl &&
+have cardctl || have pccardctl || return
+
 _cardctl()
 {
     local cur
diff --git a/completions/cfengine b/completions/cfengine
index c20382f..70b152b 100644
--- a/completions/cfengine
+++ b/completions/cfengine
@@ -1,6 +1,7 @@
 # bash completion for cfengine
 
-have cfagent && {
+have cfagent || return
+
 _cfagent_options()
 {
     COMPREPLY=( $( compgen -W '--sysadm --force-net-copy --no-check-files \
@@ -77,7 +78,6 @@ _cfrun()
     esac
 } &&
 complete -F _cfrun cfrun
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/chkconfig b/completions/chkconfig
index 2d02e56..5424520 100644
--- a/completions/chkconfig
+++ b/completions/chkconfig
@@ -1,6 +1,7 @@
 # chkconfig(8) completion
 
-have chkconfig &&
+have chkconfig || return
+
 _chkconfig()
 {
     local cur prev split=false
diff --git a/completions/chsh b/completions/chsh
index 49ada4a..2aa0bfa 100644
--- a/completions/chsh
+++ b/completions/chsh
@@ -1,5 +1,7 @@
 # chsh(1) completion
 
+have chsh || return
+
 _chsh()
 {
     local cur prev
diff --git a/completions/cksfv b/completions/cksfv
index 1f83824..629d026 100644
--- a/completions/cksfv
+++ b/completions/cksfv
@@ -1,6 +1,7 @@
 # cksfv completion by Chris <xris at forevermore.net>
 
-have cksfv &&
+have cksfv || return
+
 _cksfv()
 {
     local cur prev
diff --git a/completions/clisp b/completions/clisp
index 074f692..b0eec52 100644
--- a/completions/clisp
+++ b/completions/clisp
@@ -1,7 +1,8 @@
 # bash brogrammable completion for various Common Lisp implementations by
 # Nikodemus Siivola <nikodemus at random-state.net>
 
-have clisp &&
+have clisp || return
+
 _clisp()
 {
     local cur
diff --git a/completions/configure b/completions/configure
index ccdf521..4f8e03c 100644
--- a/completions/configure
+++ b/completions/configure
@@ -1,5 +1,7 @@
 # bash completion for configure
 
+# No "have configure" here on purpose, it's rarely in any $PATH
+
 _configure()
 {
     local cur prev split=false
diff --git a/completions/cowsay b/completions/cowsay
index c6d797a..588b239 100644
--- a/completions/cowsay
+++ b/completions/cowsay
@@ -1,6 +1,7 @@
 # bash completion for cowsay
 
-have cowsay &&
+have cowsay || return
+
 _cowsay()
 {
     local cur prev
diff --git a/completions/cpan2dist b/completions/cpan2dist
index 13f568a..63c0c59 100644
--- a/completions/cpan2dist
+++ b/completions/cpan2dist
@@ -1,6 +1,7 @@
 # bash completion for cpan2dist
 
-have cpan2dist &&
+have cpan2dist || return
+
 _cpan2dist()
 {
     local cur prev packagelist cpandirs
diff --git a/completions/cpio b/completions/cpio
index 64f4c87..3b464ed 100644
--- a/completions/cpio
+++ b/completions/cpio
@@ -1,6 +1,7 @@
 # bash completion for cpio
 
-have cpio && {
+have cpio || return
+
 _cpio_format()
 {
     COMPREPLY=( $( compgen -W 'bin odc newc crc tar ustar hpbin hpodc' -- "$cur" ) )
@@ -92,7 +93,6 @@ _cpio()
     fi
 } &&
 complete -F _cpio cpio
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/crontab b/completions/crontab
index d2ee23a..593b463 100644
--- a/completions/crontab
+++ b/completions/crontab
@@ -1,6 +1,7 @@
 # crontab(1) completion
 
-have crontab &&
+have crontab || return
+
 _crontab()
 {
     local cur prev
diff --git a/completions/cryptsetup b/completions/cryptsetup
index 5e88de3..8723d31 100644
--- a/completions/cryptsetup
+++ b/completions/cryptsetup
@@ -1,5 +1,7 @@
 # bash completion for cryptsetup
 
+have cryptsetup || return
+
 _cryptsetup_name()
 {
     COMPREPLY=( $( compgen -X control -W '$( command ls /dev/mapper )' \
@@ -12,7 +14,6 @@ _cryptsetup_device()
     _filedir
 }
 
-have cryptsetup &&
 _cryptsetup()
 {
     local cur prev arg
diff --git a/completions/cups b/completions/cups
index 2848c95..1aa4f93 100644
--- a/completions/cups
+++ b/completions/cups
@@ -1,6 +1,7 @@
 # bash completion for cups
 
-have cancel &&
+have cancel || return
+
 _cancel()
 {
     local cur
diff --git a/completions/cvs b/completions/cvs
index 5f625a4..09c3884 100644
--- a/completions/cvs
+++ b/completions/cvs
@@ -1,6 +1,7 @@
 # cvs(1) completion
 
-have cvs && {
+have cvs || return
+
 set_prefix()
 {
     [ -z ${prefix:-} ] || prefix=${cur%/*}/
@@ -381,7 +382,6 @@ _cvs()
     return 0
 } &&
 complete -F _cvs -o default cvs
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/cvsps b/completions/cvsps
index 257437b..df64db4 100644
--- a/completions/cvsps
+++ b/completions/cvsps
@@ -1,6 +1,7 @@
 # bash completion for cvsps
 
-have cvsps &&
+have cvsps || return
+
 _cvsps()
 {
     COMPREPLY=()
diff --git a/completions/dd b/completions/dd
index 7b9b3ac..ed9c5d1 100644
--- a/completions/dd
+++ b/completions/dd
@@ -1,6 +1,7 @@
 # bash completion for dd
 
-have dd &&
+have dd || return
+
 _dd()
 {
     local cur
diff --git a/completions/dhclient b/completions/dhclient
index 42185b7..4645a13 100644
--- a/completions/dhclient
+++ b/completions/dhclient
@@ -1,6 +1,7 @@
 # bash completion for dhclient
 
-have dhclient &&
+have dhclient || return
+
 _dhclient()
 {
     local cur prev
diff --git a/completions/dict b/completions/dict
index 1f728e0..26e2ecf 100644
--- a/completions/dict
+++ b/completions/dict
@@ -1,6 +1,7 @@
 # dict(1) completion
 
-have dict || have rdict && {
+have dict || have rdict || return
+
 _dictdata()
 {
     dict $host $port $1 2>/dev/null | sed -ne \
@@ -66,7 +67,6 @@ _dict()
         COMPREPLY=( $( compgen -W '$( cat $dictfile )' -- "$cur" ) )
 } &&
 complete -F _dict -o default dict rdict
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/dselect b/completions/dselect
index 3042a8d..9e0c1ff 100644
--- a/completions/dselect
+++ b/completions/dselect
@@ -1,6 +1,7 @@
 # Debian Linux dselect(8) completion.
 
-have dselect &&
+have dselect || return
+
 _dselect()
 {
     local cur prev
diff --git a/completions/dvd+rw-tools b/completions/dvd+rw-tools
index f37781e..66aa18d 100644
--- a/completions/dvd+rw-tools
+++ b/completions/dvd+rw-tools
@@ -1,6 +1,7 @@
 # dvd+rw-tools completions
 
-have growisofs &&
+have growisofs || return
+
 _growisofs()
 {
     COMPREPLY=()
diff --git a/completions/findutils b/completions/findutils
index 1fb330c..0d87874 100644
--- a/completions/findutils
+++ b/completions/findutils
@@ -2,7 +2,8 @@
 # globs and contains Linux specific code for completing the parameter
 # to the -fstype option.
 
-have find &&
+have find || return
+
 _find()
 {
     local cur prev i onlyonce
diff --git a/completions/freerdp b/completions/freerdp
index 82a4646..0edef27 100644
--- a/completions/freerdp
+++ b/completions/freerdp
@@ -1,6 +1,7 @@
 # bash completion for xfreerdp
 
-have xfreerdp &&
+have xfreerdp || return
+
 _xfreerdp()
 {
     local cur prev
diff --git a/completions/fuse b/completions/fuse
index 58d0c51..9228406 100644
--- a/completions/fuse
+++ b/completions/fuse
@@ -1,6 +1,7 @@
 # bash completion for fuse
 
-have fusermount &&
+have fusermount || return
+
 _fusermount()
 {
     COMPREPLY=()
diff --git a/completions/gcc b/completions/gcc
index 1d96825..b5d6095 100644
--- a/completions/gcc
+++ b/completions/gcc
@@ -8,7 +8,8 @@
 # ask the driver ("g++") for the name of the compiler ("cc1"), and parse the
 # --help output of the compiler.
 
-have gcc &&
+have gcc || return
+
 _gcc()
 {
     local cur cc backend
diff --git a/completions/gcl b/completions/gcl
index e093153..4ca03b6 100644
--- a/completions/gcl
+++ b/completions/gcl
@@ -1,7 +1,8 @@
 # bash programmable completion for various Common Lisp implementations by
 # Nikodemus Siivola <nikodemus at random-state.net>
 
-have gcl &&
+have gcl || return
+
 _gcl()
 {
     local cur
diff --git a/completions/gdb b/completions/gdb
index f0bc42d..063bb29 100644
--- a/completions/gdb
+++ b/completions/gdb
@@ -1,6 +1,7 @@
 # bash completion for gdb
 
-have gdb &&
+have gdb || return
+
 _gdb()
 {
     local cur prev
diff --git a/completions/genisoimage b/completions/genisoimage
index 4782412..51bf458 100644
--- a/completions/genisoimage
+++ b/completions/genisoimage
@@ -1,6 +1,7 @@
 # bash completion for mkisofs/genisoimage
 
-have mkisofs || have genisoimage &&
+have mkisofs || have genisoimage || return
+
 _mkisofs()
 {
     local cur prev
diff --git a/completions/getent b/completions/getent
index 54e62ab..68c07e0 100644
--- a/completions/getent
+++ b/completions/getent
@@ -1,6 +1,7 @@
 # bash completion for getent
 
-have getent &&
+have getent || return
+
 _getent()
 {
     local cur prev
diff --git a/completions/gkrellm b/completions/gkrellm
index 13e25ad..a063c5e 100644
--- a/completions/gkrellm
+++ b/completions/gkrellm
@@ -1,6 +1,7 @@
 # gkrellm(1) completion
 
-have gkrellm || have gkrellm2 &&
+have gkrellm || have gkrellm2 || return
+
 _gkrellm()
 {
     local cur prev
diff --git a/completions/gnatmake b/completions/gnatmake
index cdd193c..312f651 100644
--- a/completions/gnatmake
+++ b/completions/gnatmake
@@ -1,6 +1,7 @@
 # Gnatmake completion by Ralf_Schroth at t-online.de (Ralf Schroth)
 
-have gnatmake &&
+have gnatmake || return
+
 _gnatmake()
 {
     local cur
diff --git a/completions/gpg b/completions/gpg
index 5e8adba..478bfce 100644
--- a/completions/gpg
+++ b/completions/gpg
@@ -1,6 +1,7 @@
 # bash completion for gpg
 
-have gpg &&
+have gpg || return
+
 _gpg()
 {
     local cur prev
diff --git a/completions/gpg2 b/completions/gpg2
index 0589a13..c1d4877 100644
--- a/completions/gpg2
+++ b/completions/gpg2
@@ -1,6 +1,7 @@
 # gpg2(1) completion
 
-have gpg2 && {
+have gpg2 || return
+
 _gpg2()
 {
     local cur prev
@@ -41,7 +42,6 @@ _gpg2()
     fi
 } &&
 complete -F _gpg2 -o default gpg2
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/gzip b/completions/gzip
index f7aec17..d21390d 100644
--- a/completions/gzip
+++ b/completions/gzip
@@ -1,6 +1,7 @@
 # bash completion for gzip
 
-have gzip || have pigz &&
+have gzip || have pigz || return
+
 _gzip()
 {
     local cur prev xspec helpopts
diff --git a/completions/heimdal b/completions/heimdal
index 2cc4227..394c713 100644
--- a/completions/heimdal
+++ b/completions/heimdal
@@ -1,6 +1,7 @@
 # bash completion for heimdal
 
-have ktutil && {
+have ktutil || return
+
 _heimdal_principals()
 {
     COMPREPLY=( $( compgen -W "$( kadmin -l dump 2>/dev/null | \
@@ -119,7 +120,6 @@ _ktutil()
     fi
 } &&
 complete -F _ktutil ktutil
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/hping2 b/completions/hping2
index e2e6bf1..c9bd1e0 100644
--- a/completions/hping2
+++ b/completions/hping2
@@ -1,6 +1,7 @@
 # bash completion for hping2
 
-have hping || have hping2 || have hping3 &&
+have hping || have hping2 || have hping3 || return
+
 _hping2()
 {
     local cur prev
diff --git a/completions/iconv b/completions/iconv
index 9e33200..62446f6 100644
--- a/completions/iconv
+++ b/completions/iconv
@@ -1,6 +1,7 @@
 # iconv(1) completion
 
-have iconv &&
+have iconv || return
+
 _iconv()
 {
     local cur prev split=false
diff --git a/completions/iftop b/completions/iftop
index 9ec2a0d..e3f8e66 100644
--- a/completions/iftop
+++ b/completions/iftop
@@ -1,6 +1,7 @@
 # iftop(8) completion
 
-have iftop &&
+have iftop || return
+
 _iftop()
 {
     COMPREPLY=()
diff --git a/completions/ifupdown b/completions/ifupdown
index 75f9aeb..a2ffed4 100644
--- a/completions/ifupdown
+++ b/completions/ifupdown
@@ -1,6 +1,7 @@
 # Red Hat & Debian GNU/Linux if{up,down} completion
 #
-[ $USERLAND = GNU ] && { have ifup || have ifdown; } &&
+[ $USERLAND = GNU ] && have ifup || have ifdown || return
+
 _ifupdown()
 {
     local cur
diff --git a/completions/imagemagick b/completions/imagemagick
index efbd0e5..c1f91bd 100644
--- a/completions/imagemagick
+++ b/completions/imagemagick
@@ -1,6 +1,7 @@
 # bash completion for ImageMagick
 
-have convert && {
+have convert || return
+
 _ImageMagick()
 {
     local cur prev
@@ -521,7 +522,6 @@ _stream()
     fi
 } &&
 complete -F _stream stream
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/info b/completions/info
index 367cade..b71d075 100644
--- a/completions/info
+++ b/completions/info
@@ -1,6 +1,7 @@
 # bash completion for info
 
-have info &&
+have info || return
+
 _info()
 {
     local cur i infopath
diff --git a/completions/ipmitool b/completions/ipmitool
index 3a90eeb..16933a4 100644
--- a/completions/ipmitool
+++ b/completions/ipmitool
@@ -1,6 +1,6 @@
 # bash completion for ipmitool
 
-have ipmitool && {
+have ipmitool || return
 
 _ipmitool_singleline_help()
 {
@@ -200,8 +200,6 @@ _ipmitool()
             ;;
 
     esac
-}
-
 } &&
 complete -F _ipmitool ipmitool
 
diff --git a/completions/iproute2 b/completions/iproute2
index f5d7bbd..2ca6adb 100644
--- a/completions/iproute2
+++ b/completions/iproute2
@@ -1,6 +1,7 @@
 # iproute2 tools completion
 
-have ip &&
+have ip || return
+
 _ip()
 {
     COMPREPLY=()
diff --git a/completions/ipsec b/completions/ipsec
index acb8c99..f501747 100644
--- a/completions/ipsec
+++ b/completions/ipsec
@@ -1,6 +1,7 @@
 # Linux ipsec(8) completion (for FreeS/WAN)
 #
-[ $UNAME = Linux ] && have ipsec &&
+[ $UNAME = Linux ] && have ipsec || return
+
 _ipsec()
 {
     local cur
diff --git a/completions/iptables b/completions/iptables
index bd0e462..0a254f8 100644
--- a/completions/iptables
+++ b/completions/iptables
@@ -1,6 +1,7 @@
 # bash completion for iptables
 
-have iptables &&
+have iptables || return
+
 _iptables()
 {
     local cur prev table chain
diff --git a/completions/ipv6calc b/completions/ipv6calc
index 20e810d..eb69963 100644
--- a/completions/ipv6calc
+++ b/completions/ipv6calc
@@ -1,4 +1,5 @@
-have ipv6calc &&
+have ipv6calc || return
+
 _ipv6calc()
 {
     local cur prev split=false
diff --git a/completions/isql b/completions/isql
index f0ddbd7..4fda74e 100644
--- a/completions/isql
+++ b/completions/isql
@@ -1,6 +1,7 @@
 # isql completion by Victor Bogado da Silva Lins <victor at bogado.net>
 
-have isql &&
+have isql || return
+
 _isql()
 {
     local cur
diff --git a/completions/jar b/completions/jar
index 7b099d0..e64ce65 100644
--- a/completions/jar
+++ b/completions/jar
@@ -1,6 +1,7 @@
 # jar(1) completion
 
-have jar &&
+have jar || return
+
 _jar()
 {
     local cur
diff --git a/completions/k3b b/completions/k3b
index 1965717..1b6202f 100644
--- a/completions/k3b
+++ b/completions/k3b
@@ -1,6 +1,7 @@
 # bash completion for k3b
 
-have k3b &&
+have k3b || return
+
 _k3b()
 {
     local cur prev
diff --git a/completions/kldload b/completions/kldload
index 878c837..644e508 100644
--- a/completions/kldload
+++ b/completions/kldload
@@ -1,7 +1,6 @@
 # bash completion for FreeBSD kernel module commands
 
-[ $UNAME = FreeBSD ] &&
-{
+[ $UNAME = FreeBSD ] || return
 
 _kldload()
 {
@@ -29,8 +28,6 @@ _kldunload()
 } &&
 complete -F _kldunload kldunload
 
-}
-
 # Local variables:
 # mode: shell-script
 # sh-basic-offset: 4
diff --git a/completions/larch b/completions/larch
index e58374f..e78ceee 100644
--- a/completions/larch
+++ b/completions/larch
@@ -1,6 +1,7 @@
 # larch(1) completion by Alex Shinn <foof at synthcode.com>
 
-have larch &&
+have larch || return
+
 _larch()
 {
     local cur prev
diff --git a/completions/ldapvi b/completions/ldapvi
index 31e26d1..f0a17ab 100644
--- a/completions/ldapvi
+++ b/completions/ldapvi
@@ -1,6 +1,7 @@
 # bash completion for ldapvi
 
-have ldapvi &&
+have ldapvi || return
+
 _ldapvi()
 {
     local cur prev
diff --git a/completions/lilo b/completions/lilo
index 63bb5e3..ec88296 100644
--- a/completions/lilo
+++ b/completions/lilo
@@ -1,6 +1,7 @@
 # bash completion for lilo(8)
 
-have lilo && {
+have lilo || return
+
 _lilo_labels()
 {
     COMPREPLY=( $( compgen -W "$( awk -F'=' '/label/ {print $2}' \
@@ -49,7 +50,6 @@ _lilo()
     fi
 } &&
 complete -F _lilo lilo
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/links b/completions/links
index 9b7b50f..766417a 100644
--- a/completions/links
+++ b/completions/links
@@ -1,6 +1,7 @@
 # bash completion for links
 
-have links &&
+have links || return
+
 _links()
 {
     local cur
diff --git a/completions/lintian b/completions/lintian
index 100d755..fa790ab 100644
--- a/completions/lintian
+++ b/completions/lintian
@@ -3,7 +3,8 @@
 #
 # bash completion for lintian(1) and lintian-info(1)
 
-have lintian && {
+have lintian || return
+
 _lintian_tags()
 {
     local match search tags
@@ -188,4 +189,3 @@ _lintian_info()
     return 0
 } &&
 complete -F _lintian_info lintian-info
-}
diff --git a/completions/lisp b/completions/lisp
index ee43a01..79c45da 100644
--- a/completions/lisp
+++ b/completions/lisp
@@ -1,7 +1,8 @@
 # bash programmable completion for various Common Lisp implementations by
 # Nikodemus Siivola <nikodemus at random-state.net>
 
-have lisp &&
+have lisp || return
+
 _lisp()
 {
     local cur
diff --git a/completions/lrzip b/completions/lrzip
index 5cde88a..3ebbc8a 100644
--- a/completions/lrzip
+++ b/completions/lrzip
@@ -1,6 +1,7 @@
 # lrzip(1) completion
 
-have lrzip &&
+have lrzip || return
+
 _lrzip()
 {
     COMPREPLY=()
diff --git a/completions/lsof b/completions/lsof
index ac010da..a3332f1 100644
--- a/completions/lsof
+++ b/completions/lsof
@@ -1,6 +1,7 @@
 # lsof(8) completion
 
-have lsof &&
+have lsof || return
+
 _lsof()
 {
     COMPREPLY=()
diff --git a/completions/lvm b/completions/lvm
index e17a4a9..d707a87 100644
--- a/completions/lvm
+++ b/completions/lvm
@@ -1,6 +1,7 @@
 # bash completion for lvm
 
-have lvm && {
+have lvm || return
+
 _volumegroups()
 {
     COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \
@@ -1083,7 +1084,6 @@ _lvm()
     fi
 } &&
 complete -F _lvm lvm
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/lzma b/completions/lzma
index 295ef37..8b87e5a 100644
--- a/completions/lzma
+++ b/completions/lzma
@@ -1,6 +1,7 @@
 # lzma(1) completion by Per Øyvind Karlsen <peroyvind at mandriva.org>
 
-have lzma &&
+have lzma || return
+
 _lzma()
 {
     local cur prev xspec
diff --git a/completions/lzop b/completions/lzop
index 6d38412..53f6750 100644
--- a/completions/lzop
+++ b/completions/lzop
@@ -1,6 +1,7 @@
 # lzop(1) completion
 
-have lzop &&
+have lzop || return
+
 _lzop()
 {
     local cur prev xspec
diff --git a/completions/make b/completions/make
index 76e9528..de75d5b 100644
--- a/completions/make
+++ b/completions/make
@@ -1,6 +1,7 @@
 # bash completion for GNU make
 
-have make || have gmake || have gnumake || have pmake &&
+have make || have gmake || have gnumake || have pmake || return
+
 _make()
 {
     local file makef makef_dir="." makef_inc cur prev i split=false
diff --git a/completions/mc b/completions/mc
index 09e9eab..968139f 100644
--- a/completions/mc
+++ b/completions/mc
@@ -1,6 +1,7 @@
 # bash completion for mc
 
-have mc &&
+have mc || return
+
 _mc()
 {
     local cur prev split=false
diff --git a/completions/mcrypt b/completions/mcrypt
index 32c4f89..a6c21ce 100644
--- a/completions/mcrypt
+++ b/completions/mcrypt
@@ -1,6 +1,7 @@
 # mcrypt(1) completion by Ariel Fermani <the_end at bbs.frc.utn.edu.ar>
 
-have mcrypt || have mdecrypt &&
+have mcrypt || have mdecrypt || return
+
 _mcrypt()
 {
     local cur prev i decrypt
diff --git a/completions/mdadm b/completions/mdadm
index fcabdfb..fe03eba 100644
--- a/completions/mdadm
+++ b/completions/mdadm
@@ -1,7 +1,7 @@
 # bash completion for mdadm
 
-have mdadm &&
-{
+have mdadm || return
+
 _mdadm_raid_level()
 {
     local mode
@@ -151,7 +151,6 @@ _mdadm()
     fi
 } &&
 complete -F _mdadm mdadm
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/medusa b/completions/medusa
index d8dcfe4..5aa13f6 100644
--- a/completions/medusa
+++ b/completions/medusa
@@ -1,6 +1,7 @@
 # bash completion for medusa
 
-have medusa &&
+have medusa || return
+
 _medusa()
 {
     local cur prev
diff --git a/completions/minicom b/completions/minicom
index 7655331..6a5e864 100644
--- a/completions/minicom
+++ b/completions/minicom
@@ -1,6 +1,7 @@
 # bash completion for minicom
 
-have minicom &&
+have minicom || return
+
 _minicom()
 {
     local cur prev confdir
diff --git a/completions/mkinitrd b/completions/mkinitrd
index 4889347..d8626d6 100644
--- a/completions/mkinitrd
+++ b/completions/mkinitrd
@@ -1,6 +1,7 @@
 # bash completion for mkinitrd
 
-have mkinitrd &&
+have mkinitrd || return
+
 _mkinitrd()
 {
     local cur prev args split=false
diff --git a/completions/mount b/completions/mount
index b14eef3..554e744 100644
--- a/completions/mount
+++ b/completions/mount
@@ -4,8 +4,7 @@
 # query the server for a list of all available exports and complete on
 # that instead.
 #
-have mount &&
-{
+have mount || return
 
 # Just like COMPREPLY=(`compgen -W "${COMPREPLY[*]}" -- "$cur"`), only better!
 #
@@ -154,8 +153,6 @@ _umount()
 } &&
 complete -F _umount -o dirnames umount
 
-}
-
 # Local variables:
 # mode: shell-script
 # sh-basic-offset: 4
diff --git a/completions/mplayer b/completions/mplayer
index 76966c0..52c0590 100644
--- a/completions/mplayer
+++ b/completions/mplayer
@@ -1,6 +1,7 @@
 # mplayer(1) completion
 
-have mplayer && {
+have mplayer || return
+
 _mplayer_options_list()
 {
     cur=${cur%\\}
@@ -258,7 +259,6 @@ _mplayer()
     return 0
 } &&
 complete -F _mplayer mplayer mencoder gmplayer kplayer
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/msynctool b/completions/msynctool
index 3f9afb7..21b4dd8 100644
--- a/completions/msynctool
+++ b/completions/msynctool
@@ -1,6 +1,7 @@
 # bash completion for msynctool
 
-have msynctool &&
+have msynctool || return
+
 _msynctool()
 {
     local cur prev anteprev
diff --git a/completions/mtx b/completions/mtx
index 0454f03..8cfa493 100644
--- a/completions/mtx
+++ b/completions/mtx
@@ -1,6 +1,7 @@
 # mtx completion by Jon Middleton <jjm at ixtab.org.uk>
 
-have mtx &&
+have mtx || return
+
 _mtx()
 {
     local cur prev options tapes drives
diff --git a/completions/mutt b/completions/mutt
index d11d7a5..7e830b3 100644
--- a/completions/mutt
+++ b/completions/mutt
@@ -3,7 +3,7 @@
 # Mutt doesn't have an "addressbook" like Pine, but it has aliases and
 # a "query" function to retrieve addresses, so that's what we use here.
 
-have mutt || have muttng && {
+have mutt || have muttng || return
 
 # @param $1 (cur) Current word to complete
 _muttaddr()
@@ -175,7 +175,6 @@ _mutt()
     esac
 } &&
 complete -F _mutt -o default mutt muttng
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/mysqladmin b/completions/mysqladmin
index c941569..ccb8e37 100644
--- a/completions/mysqladmin
+++ b/completions/mysqladmin
@@ -1,6 +1,7 @@
 # bash completion for mysqladmin
 
-have mysqladmin &&
+have mysqladmin || return
+
 _mysqladmin()
 {
     local cur prev split=false
diff --git a/completions/ncftp b/completions/ncftp
index b831f44..152d9c4 100644
--- a/completions/ncftp
+++ b/completions/ncftp
@@ -1,6 +1,7 @@
 # bash completion for ncftp
 
-have ncftp &&
+have ncftp || return
+
 _ncftp()
 {
     local cur
diff --git a/completions/nmap b/completions/nmap
index 19f0a07..f1ea1c4 100644
--- a/completions/nmap
+++ b/completions/nmap
@@ -1,6 +1,7 @@
 # bash completion for nmap
 
-have nmap &&
+have nmap || return
+
 _nmap()
 {
     local cur prev
diff --git a/completions/ntpdate b/completions/ntpdate
index bf004b5..9cee6b6 100644
--- a/completions/ntpdate
+++ b/completions/ntpdate
@@ -1,6 +1,7 @@
 # bash completion for ntpdate
 
-have ntpdate &&
+have ntpdate || return
+
 _ntpdate()
 {
     local cur prev
diff --git a/completions/open-iscsi b/completions/open-iscsi
index 8c650d5..a697417 100644
--- a/completions/open-iscsi
+++ b/completions/open-iscsi
@@ -1,6 +1,7 @@
 # iscsiadm(1) completion
 
-have iscsiadm &&
+have iscsiadm || return
+
 _iscsiadm()
 {
     local cur prev mode split=false
diff --git a/completions/openldap b/completions/openldap
index e927714..4e30588 100644
--- a/completions/openldap
+++ b/completions/openldap
@@ -1,6 +1,7 @@
 # bash completion for openldap
 
-have ldapsearch && {
+have ldapsearch || return
+
 _ldap_uris()
 {
     COMPREPLY=( $( compgen -W 'ldap:// ldaps://' -- "$cur" ) )
@@ -255,7 +256,6 @@ _ldappasswd()
     fi
 } &&
 complete -F _ldappasswd ldappasswd
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/openssl b/completions/openssl
index 6da2ded..0b09e97 100644
--- a/completions/openssl
+++ b/completions/openssl
@@ -1,6 +1,7 @@
 # bash completion for openssl
 
-have openssl && {
+have openssl || return
+
 _openssl_sections()
 {
     local config f
@@ -243,7 +244,6 @@ _openssl()
     fi
 } &&
 complete -F _openssl -o default openssl
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/p4 b/completions/p4
index 59b02c1..5a5d856 100644
--- a/completions/p4
+++ b/completions/p4
@@ -1,6 +1,7 @@
 # Perforce completion by Frank Cusack <frank at google.com>
 
-have p4 &&
+have p4 || return
+
 _p4()
 {
     local cur prev words cword p4commands p4filetypes
diff --git a/completions/perl b/completions/perl
index a3ffbe2..aae189e 100644
--- a/completions/perl
+++ b/completions/perl
@@ -1,7 +1,7 @@
 # bash completion for perl
 
-have perl &&
-{
+have perl || return
+
 _perlmodules()
 {
     COMPREPLY=( $( compgen -P "$prefix" -W \
@@ -127,7 +127,6 @@ _perldoc()
     fi
 } &&
 complete -F _perldoc -o bashdefault perldoc
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/pine b/completions/pine
index 2f06928..41a9834 100644
--- a/completions/pine
+++ b/completions/pine
@@ -1,6 +1,7 @@
 # PINE address-book completion
 
-have pine || have alpine &&
+have pine || have alpine || return
+
 _pineaddr()
 {
     local cur
diff --git a/completions/pkg-config b/completions/pkg-config
index b999bd8..24edac6 100644
--- a/completions/pkg-config
+++ b/completions/pkg-config
@@ -1,6 +1,7 @@
 # bash completion for pkgconfig
 
-have pkg-config &&
+have pkg-config || return
+
 _pkg_config()
 {
     local cur prev split=false
diff --git a/completions/pkg_install b/completions/pkg_install
index cb94ae7..95a17ac 100644
--- a/completions/pkg_install
+++ b/completions/pkg_install
@@ -1,7 +1,6 @@
 # bash completion for FreeBSD base package management tools
 
-[ $UNAME = FreeBSD ] &&
-{
+[ $UNAME = FreeBSD ] || return
 
 _pkg_delete()
 {
@@ -19,8 +18,6 @@ _pkg_delete()
 } &&
 complete -F _pkg_delete -o dirnames pkg_delete pkg_info
 
-}
-
 # Local variables:
 # mode: shell-script
 # sh-basic-offset: 4
diff --git a/completions/pkgtools b/completions/pkgtools
index 4b1ed19..4cb8d09 100644
--- a/completions/pkgtools
+++ b/completions/pkgtools
@@ -1,6 +1,7 @@
 # bash completion for Slackware Linux pkgtools
 
-[ -f /etc/slackware-version ] && have removepkg &&
+[ -f /etc/slackware-version ] && have removepkg || return
+
 _removepkg()
 {
     local packages cur
diff --git a/completions/postfix b/completions/postfix
index c3d3eb6..b2e0b83 100644
--- a/completions/postfix
+++ b/completions/postfix
@@ -1,6 +1,7 @@
 # bash completion for postfix
 
-have postfix && {
+have postfix || return
+
 # postfix(1)
 #
 _postfix()
@@ -222,7 +223,6 @@ _postsuper()
     COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- "$cur" ) )
 } &&
 complete -F _postsuper postsuper
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/postgresql b/completions/postgresql
index d0a2efc..c0e80b6 100644
--- a/completions/postgresql
+++ b/completions/postgresql
@@ -1,6 +1,7 @@
 # bash completion for Postgresql
 
-have psql && {
+have psql || return
+
 _pg_databases()
 {
     # -w was introduced in 8.4, https://launchpad.net/bugs/164772
@@ -151,7 +152,6 @@ _psql()
     fi
 } &&
 complete -F _psql psql
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/povray b/completions/povray
index a843a5c..b5ba4c0 100644
--- a/completions/povray
+++ b/completions/povray
@@ -1,6 +1,7 @@
 # povray completion by "David Necas (Yeti)" <yeti at physics.muni.cz>
 
-have povray || have xpovray || have spovray &&
+have povray || have xpovray || have spovray || return
+
 _povray()
 {
     local cur prev povcur pfx oext defoext
diff --git a/completions/puppet b/completions/puppet
index 1c30312..b130ece 100644
--- a/completions/puppet
+++ b/completions/puppet
@@ -1,5 +1,8 @@
 # bash completion for puppet
 
+have puppetmasterd || have puppetd || have puppetca || have ralsh || \
+have puppetrun || have puppetqd || have filebucket || have puppetdoc || return
+
 _puppet_logdest()
 {
     if [ -z "$cur" ]; then
@@ -45,8 +48,6 @@ _puppet_references()
     COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$puppet_doc_list" -- "$cur" ) )
 }
 
-have puppetmasterd || have puppetd || have puppetca || have ralsh || \
-have puppetrun || have puppetqd || have filebucket || have puppetdoc && \
 _puppet()
 {
     local cur prev xspec helpopts command subcommand
diff --git a/completions/python b/completions/python
index 17f96f5..badff32 100644
--- a/completions/python
+++ b/completions/python
@@ -1,6 +1,7 @@
 # bash completion for python
 
-have python &&
+have python || return
+
 _python()
 {
     local prev cur i
diff --git a/completions/qdbus b/completions/qdbus
index 879df68..2b7f2e7 100644
--- a/completions/qdbus
+++ b/completions/qdbus
@@ -1,6 +1,7 @@
 # Qt qdbus, dcop completion
 
-have qdbus || have dcop &&
+have qdbus || have dcop || return
+
 _qdbus()
 {
     local cur
diff --git a/completions/qemu b/completions/qemu
index 03fa563..5cac45e 100644
--- a/completions/qemu
+++ b/completions/qemu
@@ -1,6 +1,7 @@
 # bash completion for qemu
 
-have qemu &&
+have qemu || return
+
 _qemu()
 {
     local cur prev
diff --git a/completions/quota-tools b/completions/quota-tools
index f87bb1d..e293141 100644
--- a/completions/quota-tools
+++ b/completions/quota-tools
@@ -1,6 +1,7 @@
 # bash completion for quota-tools
 
-have quota && {
+have quota || return
+
 _user_or_group()
 {
     local i
@@ -246,7 +247,6 @@ _quotaoff()
     fi
 } &&
 complete -F _quotaoff -o default quotaoff
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/rcs b/completions/rcs
index d859b8a..f8a1415 100644
--- a/completions/rcs
+++ b/completions/rcs
@@ -1,6 +1,7 @@
 # bash completion for rcs
 
-have rcs &&
+have rcs || return
+
 _rcs()
 {
     local cur prev file dir i
diff --git a/completions/rdesktop b/completions/rdesktop
index 7acf47a..aa95d20 100644
--- a/completions/rdesktop
+++ b/completions/rdesktop
@@ -1,6 +1,7 @@
 # bash completion for rdesktop
 
-have rdesktop &&
+have rdesktop || return
+
 _rdesktop()
 {
     local cur prev
diff --git a/completions/reptyr b/completions/reptyr
index 071fddd..d1ccdb3 100644
--- a/completions/reptyr
+++ b/completions/reptyr
@@ -1,6 +1,7 @@
 # bash completion for reptyr(1)
 
-have reptyr &&
+have reptyr || return
+
 _reptyr()
 {
     local cur prev
diff --git a/completions/resolvconf b/completions/resolvconf
index 9773696..f21adc3 100644
--- a/completions/resolvconf
+++ b/completions/resolvconf
@@ -1,6 +1,7 @@
 # bash completion for resolvconf
 
-have resolvconf &&
+have resolvconf || return
+
 _resolvconf()
 {
     local cur command
diff --git a/completions/rfkill b/completions/rfkill
index 5c51ff9..50e79ab 100644
--- a/completions/rfkill
+++ b/completions/rfkill
@@ -1,6 +1,7 @@
 # bash completion for rfkill
 
-have rfkill &&
+have rfkill || return
+
 _rfkill()
 {
     local cur prev
diff --git a/completions/ri b/completions/ri
index b4ad30a..4a9d4da 100644
--- a/completions/ri
+++ b/completions/ri
@@ -1,6 +1,7 @@
 # ri completion for Ruby documentation by Ian Macdonald <ian at caliban.org>
 
-have ri && {
+have ri || return
+
 ri_get_methods()
 {
     local regex
@@ -85,7 +86,6 @@ _ri()
     ri_get_methods
 } &&
 complete -F _ri ri
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/rpcdebug b/completions/rpcdebug
index ee27e5e..f1590a6 100644
--- a/completions/rpcdebug
+++ b/completions/rpcdebug
@@ -1,6 +1,7 @@
 # bash completion for rpcdebug
 
-have rpcdebug && {
+have rpcdebug || return
+
 _rpcdebug_flags()
 {
 
@@ -45,7 +46,6 @@ _rpcdebug()
     fi
 } &&
 complete -F _rpcdebug rpcdebug
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/rpmcheck b/completions/rpmcheck
index 5d9aada..9dd3311 100644
--- a/completions/rpmcheck
+++ b/completions/rpmcheck
@@ -1,6 +1,7 @@
 # bash completion for rpmcheck
 
-have rpmcheck &&
+have rpmcheck || return
+
 _rpmcheck()
 {
     local cur prev
diff --git a/completions/rrdtool b/completions/rrdtool
index 0b15a23..b2ad71f 100644
--- a/completions/rrdtool
+++ b/completions/rrdtool
@@ -1,6 +1,7 @@
 # bash completion for rrdtool
 
-have rrdtool &&
+have rrdtool || return
+
 _rrdtool ()
 {
     local cur
diff --git a/completions/rsync b/completions/rsync
index b0f2d10..1299202 100644
--- a/completions/rsync
+++ b/completions/rsync
@@ -1,6 +1,7 @@
 # bash completion for rsync
 
-have rsync &&
+have rsync || return
+
 _rsync()
 {
     # TODO: _split_longopt
diff --git a/completions/rtcwake b/completions/rtcwake
index c95c1d7..9f2e896 100644
--- a/completions/rtcwake
+++ b/completions/rtcwake
@@ -1,6 +1,7 @@
 # bash completion for rtcwake
 
-have rtcwake &&
+have rtcwake || return
+
 _rtcwake()
 {
     COMPREPLY=()
diff --git a/completions/samba b/completions/samba
index 7aaee53..7568a56 100644
--- a/completions/samba
+++ b/completions/samba
@@ -1,6 +1,7 @@
 # bash completion for samba
 
-have smbclient && {
+have smbclient || return
+
 _samba_resolve_order()
 {
     COMPREPLY=( $( compgen -W 'lmhosts host wins bcast' -- "$cur" ) )
@@ -287,7 +288,6 @@ _smbtree()
     fi
 } &&
 complete -F _smbtree smbtree
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/sbcl b/completions/sbcl
index 33671a6..7bf1ab9 100644
--- a/completions/sbcl
+++ b/completions/sbcl
@@ -1,7 +1,8 @@
 # bash programmable completion for various Common Lisp implementations by
 # Nikodemus Siivola <nikodemus at random-state.net>
 
-have sbcl || have sbcl-mt &&
+have sbcl || have sbcl-mt || return
+
 _sbcl()
 {
     local cur
diff --git a/completions/screen b/completions/screen
index 952d976..15aaa78 100644
--- a/completions/screen
+++ b/completions/screen
@@ -1,6 +1,7 @@
 # bash completion for screen
 
-have screen &&
+have screen || return
+
 _screen_sessions()
 {
     COMPREPLY=( $( compgen -W "$( command screen -ls | sed -ne \
diff --git a/completions/service b/completions/service
index 5e248f7..d49a668 100644
--- a/completions/service
+++ b/completions/service
@@ -3,8 +3,9 @@
 # This completes on a list of all available service scripts for the
 # 'service' command and/or the SysV init.d directory, followed by
 # that script's available commands
-#
-[ -d /etc/init.d ] || have service &&
+
+[ -d /etc/init.d ] || have service || return
+
 _service()
 {
     local cur prev sysvdir
diff --git a/completions/sh b/completions/sh
index 9c7ca02..79a546a 100644
--- a/completions/sh
+++ b/completions/sh
@@ -1,6 +1,7 @@
 # POSIX sh(1) completion
 
-have sh &&
+have sh || return
+
 _sh()
 {
     COMPREPLY=()
diff --git a/completions/sitecopy b/completions/sitecopy
index 616bc5e..2535e85 100644
--- a/completions/sitecopy
+++ b/completions/sitecopy
@@ -2,7 +2,8 @@
 # Copyright 2003 Eelco Lempsink <eelcolempsink at gmx.net>
 # License: GNU GPL v2 or later
 
-have sitecopy &&
+have sitecopy || return
+
 _sitecopy()
 {
     local cur
diff --git a/completions/smartctl b/completions/smartctl
index 3ce864b..8ac0ae3 100644
--- a/completions/smartctl
+++ b/completions/smartctl
@@ -1,7 +1,7 @@
 # bash completion for smartctl(8)
 
-have smartctl &&
-{
+have smartctl || return
+
 _smartctl_quietmode()
 {
     COMPREPLY=( $( compgen -W 'errorsonly silent noserial' -- "$cur" ) )
@@ -180,7 +180,6 @@ _smartctl()
     fi
 } &&
 complete -F _smartctl smartctl
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/snownews b/completions/snownews
index 9c99ed7..c579bca 100644
--- a/completions/snownews
+++ b/completions/snownews
@@ -1,6 +1,7 @@
 # snownews(1) completion
 
-have snownews &&
+have snownews || return
+
 _snownews()
 {
     local cur
diff --git a/completions/sqlite3 b/completions/sqlite3
index b37c55f..75618d2 100644
--- a/completions/sqlite3
+++ b/completions/sqlite3
@@ -1,6 +1,7 @@
 # sqlite3(1) completion
 
-have sqlite3 &&
+have sqlite3 || return
+
 _sqlite3()
 {
     COMPREPLY=()
diff --git a/completions/ssh b/completions/ssh
index e6802b7..77694fc 100644
--- a/completions/ssh
+++ b/completions/ssh
@@ -1,7 +1,6 @@
 # ssh(1) completion
 
-have ssh &&
-{
+have ssh || return
 
 _ssh_bindaddress()
 {
@@ -417,7 +416,6 @@ _ssh_copy_id()
     return 0
 } &&
 complete -F _ssh_copy_id ssh-copy-id
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/sshfs b/completions/sshfs
index d7945f8..c4d2edd 100644
--- a/completions/sshfs
+++ b/completions/sshfs
@@ -1,6 +1,7 @@
 # sshfs(1) completion
 
-have sshfs &&
+have sshfs || return
+
 _sshfs()
 {
     local cur userhost path
diff --git a/completions/strace b/completions/strace
index 0ee2737..fcc79d2 100644
--- a/completions/strace
+++ b/completions/strace
@@ -1,6 +1,7 @@
 # bash completion for strace
 
-have strace &&
+have strace || return
+
 _strace()
 {
     local cur prev offset i syscalls arch unistd
diff --git a/completions/svk b/completions/svk
index bda5997..bd2d097 100644
--- a/completions/svk
+++ b/completions/svk
@@ -1,6 +1,7 @@
 # svk(1) completion
 
-have svk &&
+have svk || return
+
 _svk()
 {
     local cur prev commands options command
diff --git a/completions/sysbench b/completions/sysbench
index 0391efa..c487f28 100644
--- a/completions/sysbench
+++ b/completions/sysbench
@@ -4,7 +4,8 @@
 # reasons; assuming bash >= 4 we could instead not turn it on
 # initially but only in the few cases where it's actually needed.
 
-have sysbench &&
+have sysbench || return
+
 _sysbench()
 {
     COMPREPLY=()
diff --git a/completions/sysctl b/completions/sysctl
index ac25f4e..13a9136 100644
--- a/completions/sysctl
+++ b/completions/sysctl
@@ -1,6 +1,7 @@
 # bash completion for sysctl
 
-have sysctl &&
+have sysctl || return
+
 _sysctl()
 {
     local cur
diff --git a/completions/tar b/completions/tar
index bb57cef..1270b26 100644
--- a/completions/tar
+++ b/completions/tar
@@ -1,6 +1,7 @@
 # bash completion for GNU tar
 
-have tar && {
+have tar || return
+
 _tar()
 {
     local cur prev words cword ext regex tar untar
@@ -132,7 +133,6 @@ _tar()
 }
 [ -n "${COMP_TAR_INTERNAL_PATHS:-}" ] && complete -F _tar -o dirnames tar ||
     complete -F _tar tar
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/tcpdump b/completions/tcpdump
index 259f13e..e4bfdd9 100644
--- a/completions/tcpdump
+++ b/completions/tcpdump
@@ -1,6 +1,7 @@
 # bash completion for tcpdump
 
-have tcpdump &&
+have tcpdump || return
+
 _tcpdump()
 {
     local cur prev
diff --git a/completions/unace b/completions/unace
index 9d27ef5..3083410 100644
--- a/completions/unace
+++ b/completions/unace
@@ -1,6 +1,7 @@
 # unace(1) completion
 
-have unace &&
+have unace || return
+
 _unace()
 {
     local cur
diff --git a/completions/unrar b/completions/unrar
index 0a4fe27..e561133 100644
--- a/completions/unrar
+++ b/completions/unrar
@@ -1,6 +1,7 @@
 # unrar(1) completion
 
-have unrar &&
+have unrar || return
+
 _unrar()
 {
     local cur
diff --git a/completions/update-alternatives b/completions/update-alternatives
index 2dbd85e..a4bdf96 100644
--- a/completions/update-alternatives
+++ b/completions/update-alternatives
@@ -1,6 +1,7 @@
 # bash completion for update-alternatives
 
-have update-alternatives && {
+have update-alternatives || return
+
 _installed_alternatives()
 {
     local admindir
@@ -89,7 +90,6 @@ _update_alternatives()
     esac
 } &&
 complete -F _update_alternatives update-alternatives alternatives
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/vpnc b/completions/vpnc
index 722fee3..174b8f3 100644
--- a/completions/vpnc
+++ b/completions/vpnc
@@ -1,6 +1,7 @@
 # bash completion for vpnc
 
-have vpnc &&
+have vpnc || return
+
 _vpnc()
 {
     local cur prev
diff --git a/completions/wireless-tools b/completions/wireless-tools
index 56ba0db..52d44bc 100644
--- a/completions/wireless-tools
+++ b/completions/wireless-tools
@@ -1,7 +1,6 @@
 # bash completion for Linux wireless-tools
 
-[ $UNAME = Linux ] &&
-{
+[ $UNAME = Linux ] || return
 
 have iwconfig &&
 _iwconfig()
@@ -169,8 +168,6 @@ _iwpriv()
 } &&
 complete -F _iwpriv iwpriv
 
-}
-
 # Local variables:
 # mode: shell-script
 # sh-basic-offset: 4
diff --git a/completions/wodim b/completions/wodim
index 0348cc6..9682df2 100644
--- a/completions/wodim
+++ b/completions/wodim
@@ -4,7 +4,8 @@
 # reasons; assuming bash >= 4 we could instead not turn it on
 # initially but only in the few cases where it's actually needed.
 
-have cdrecord || have wodim &&
+have cdrecord || have wodim || return
+
 _cdrecord()
 {
     local cur prev i generic_options track_options track_mode
diff --git a/completions/wol b/completions/wol
index 89a1a8b..3e663ac 100644
--- a/completions/wol
+++ b/completions/wol
@@ -1,6 +1,7 @@
 # wol(1) completion
 
-have wol &&
+have wol || return
+
 _wol()
 {
     local cur prev split=false
diff --git a/completions/wtf b/completions/wtf
index a611978..d68b6ba 100644
--- a/completions/wtf
+++ b/completions/wtf
@@ -1,7 +1,8 @@
 # wtf completion
 # Raphael Droz, 25/09/2009
 
-have wtf &&
+have wtf || return
+
 _wtf()
 {
     local cur prev db
diff --git a/completions/wvdial b/completions/wvdial
index 3b135f0..bc7e59b 100644
--- a/completions/wvdial
+++ b/completions/wvdial
@@ -1,6 +1,7 @@
 # bash completion for wvdial
 
-have wvdial &&
+have wvdial || return
+
 _wvdial()
 {
     local cur prev config i IFS=$'\n'
diff --git a/completions/xhost b/completions/xhost
index cec4adc..0476afe 100644
--- a/completions/xhost
+++ b/completions/xhost
@@ -1,6 +1,7 @@
 # xhost(1) completion
 
-have xhost &&
+have xhost || return
+
 _xhost ()
 {
     local cur
diff --git a/completions/xm b/completions/xm
index dede1b6..1e76139 100644
--- a/completions/xm
+++ b/completions/xm
@@ -1,6 +1,7 @@
 # bash completion for xm
 
-have xm && {
+have xm || return
+
 _xen_domain_names()
 {
     COMPREPLY=( $(compgen -W "$( xm list 2>/dev/null | \
@@ -222,7 +223,6 @@ _xm()
     return 0
 } &&
 complete -F _xm xm
-}
 
 # Local variables:
 # mode: shell-script
diff --git a/completions/xmllint b/completions/xmllint
index 5b9c301..7e83296 100644
--- a/completions/xmllint
+++ b/completions/xmllint
@@ -1,6 +1,7 @@
 # bash completion for xmllint(1)
 
-have xmllint &&
+have xmllint || return
+
 _xmllint()
 {
     local cur prev
diff --git a/completions/xmlwf b/completions/xmlwf
index ba02524..0df6404 100644
--- a/completions/xmlwf
+++ b/completions/xmlwf
@@ -1,6 +1,7 @@
 # bash completion for xmlwf(1)
 
-have xmlwf &&
+have xmlwf || return
+
 _xmlwf()
 {
     local cur prev
diff --git a/completions/xmms b/completions/xmms
index 662e2fa..cb031da 100644
--- a/completions/xmms
+++ b/completions/xmms
@@ -1,6 +1,7 @@
 # bash completion for xmms
 
-have xmms &&
+have xmms || return
+
 _xmms()
 {
     local cur
diff --git a/completions/xmodmap b/completions/xmodmap
index cde9e7e..dfa6741 100644
--- a/completions/xmodmap
+++ b/completions/xmodmap
@@ -1,6 +1,7 @@
 # xmodmap(1) completion
 
-have xmodmap &&
+have xmodmap || return
+
 _xmodmap()
 {
     COMPREPLY=()
diff --git a/completions/xrandr b/completions/xrandr
index 70de80f..b1747e6 100644
--- a/completions/xrandr
+++ b/completions/xrandr
@@ -1,6 +1,7 @@
 # bash completion for xrandr
 
-have xrandr &&
+have xrandr || return
+
 _xrandr()
 {
     local cur prev output modes
diff --git a/completions/xrdb b/completions/xrdb
index 7307f01..77d6889 100644
--- a/completions/xrdb
+++ b/completions/xrdb
@@ -1,6 +1,7 @@
 # xrdb(1) completion
 
-have xrdb &&
+have xrdb || return
+
 _xrdb()
 {
     COMPREPLY=()
diff --git a/completions/xsltproc b/completions/xsltproc
index 2782f80..6b837c0 100644
--- a/completions/xsltproc
+++ b/completions/xsltproc
@@ -1,6 +1,7 @@
 # xsltproc(1) completion
 
-have xsltproc &&
+have xsltproc || return
+
 _xsltproc()
 {
     local cur prev
diff --git a/completions/xz b/completions/xz
index 45fc0d3..420c585 100644
--- a/completions/xz
+++ b/completions/xz
@@ -1,6 +1,7 @@
 # xz(1) completion
 
-have xz || have pxz &&
+have xz || have pxz || return
+
 _xz()
 {
     COMPREPLY=()
diff --git a/completions/yp-tools b/completions/yp-tools
index 7252a12..856c2c2 100644
--- a/completions/yp-tools
+++ b/completions/yp-tools
@@ -1,6 +1,7 @@
 # bash completion for yp-tools
 
-have ypcat &&
+have ypcat || return
+
 _ypmatch()
 {
     local cur map cmd
diff --git a/completions/yum-arch b/completions/yum-arch
index bb864af..7fc5ed3 100644
--- a/completions/yum-arch
+++ b/completions/yum-arch
@@ -1,6 +1,7 @@
 # yum-arch(8) completion
 
-have yum-arch &&
+have yum-arch || return
+
 _yum_arch()
 {
     local cur

-- 
bash-completion



More information about the Bash-completion-commits mailing list