Add missing 'have foo's.

This commit is contained in:
Ville Skyttä 2009-06-08 21:22:43 +03:00
parent cb8c77011e
commit e7c3bbe23c
27 changed files with 82 additions and 42 deletions

View File

@ -3,6 +3,7 @@
# #
# BitKeeper completion adapted from code by Bart Trojanowski <bart@jukie.net> # BitKeeper completion adapted from code by Bart Trojanowski <bart@jukie.net>
have bk &&
_bk() { _bk() {
local BKCMDS local BKCMDS
@ -16,5 +17,5 @@ _bk() {
_filedir _filedir
return 0 return 0
} } &&
complete -F _bk bk complete -F _bk bk

View File

@ -3,6 +3,8 @@
# #
# btdownloadheadless(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr> # btdownloadheadless(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
have btdownloadheadless.py || have btdownloadcurses.py || \
have btdownloadgui.py &&
_btdownload() _btdownload()
{ {
local cur prev local cur prev
@ -34,5 +36,5 @@ _btdownload()
else else
_filedir _filedir
fi fi
} } &&
complete -F _btdownload btdownloadheadless.py btdownloadcurses.py btdownloadgui.py complete -F _btdownload btdownloadheadless.py btdownloadcurses.py btdownloadgui.py

View File

@ -3,6 +3,7 @@
# #
# cksfv completion by Chris <xris@forevermore.net> # cksfv completion by Chris <xris@forevermore.net>
have cksfv &&
_cksfv() _cksfv()
{ {
COMPREPLY=() COMPREPLY=()
@ -26,5 +27,5 @@ _cksfv()
_filedir _filedir
return 0 return 0
} } &&
complete -F _cksfv cksfv complete -F _cksfv cksfv

View File

@ -4,6 +4,7 @@
# bash brogrammable completion for various Common Lisp implementations by # bash brogrammable completion for various Common Lisp implementations by
# Nikodemus Siivola <nikodemus@random-state.net> # Nikodemus Siivola <nikodemus@random-state.net>
have clisp &&
_clisp() _clisp()
{ {
local cur local cur
@ -22,5 +23,5 @@ _clisp()
fi fi
return 0 return 0
} } &&
complete -F _clisp $default clisp complete -F _clisp $default clisp

View File

@ -5,6 +5,7 @@
# arpspoof(8) completion # arpspoof(8) completion
# #
have arpspoof &&
_arpspoof() _arpspoof()
{ {
local cur prev local cur prev
@ -30,11 +31,12 @@ _arpspoof()
_known_hosts _known_hosts
fi fi
} } &&
complete -F _arpspoof arpspoof complete -F _arpspoof arpspoof
# dnsspoof(8) completion # dnsspoof(8) completion
# #
have dnsspoof &&
_dnsspoof() _dnsspoof()
{ {
local cur prev local cur prev
@ -58,11 +60,12 @@ _dnsspoof()
COMPREPLY=( $( compgen -W '-i -f' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -f' -- $cur ) )
fi fi
} } &&
complete -F _dnsspoof dnsspoof complete -F _dnsspoof dnsspoof
# dsniff(8) completion # dsniff(8) completion
# #
have dsniff &&
_dsniff() _dsniff()
{ {
local cur prev local cur prev
@ -87,11 +90,12 @@ _dsniff()
-r -w' -- $cur ) ) -r -w' -- $cur ) )
fi fi
} } &&
complete -F _dsniff dsniff complete -F _dsniff dsniff
# filesnarf(8), mailsnarf(8) and msgsnarf (8) completion # filesnarf(8), mailsnarf(8) and msgsnarf (8) completion
# #
have filesnarf || have mailsnarf || have msgsnarf &&
_snarf() _snarf()
{ {
local cur prev local cur prev
@ -111,11 +115,12 @@ _snarf()
COMPREPLY=( $( compgen -W '-i -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -v' -- $cur ) )
fi fi
} } &&
complete -F _snarf filesnarf mailsnarf msgsnarf complete -F _snarf filesnarf mailsnarf msgsnarf
# macof(8) completion # macof(8) completion
# #
have macof &&
_macof() _macof()
{ {
local cur prev local cur prev
@ -136,11 +141,12 @@ _macof()
COMPREPLY=( $( compgen -W '-i -s -d -e -x -y -n' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -s -d -e -x -y -n' -- $cur ) )
fi fi
} } &&
complete -F _macof macof complete -F _macof macof
# sshmitm(8) completion # sshmitm(8) completion
# #
have sshmitm &&
_sshmitm() _sshmitm()
{ {
local cur local cur
@ -154,11 +160,12 @@ _sshmitm()
_known_hosts _known_hosts
fi fi
} } &&
complete -F _sshmitm sshmitm complete -F _sshmitm sshmitm
# sshow(8) completion # sshow(8) completion
# #
have sshow &&
_sshow() _sshow()
{ {
local cur prev local cur prev
@ -178,11 +185,12 @@ _sshow()
COMPREPLY=( $( compgen -W '-d -i' -- $cur ) ) COMPREPLY=( $( compgen -W '-d -i' -- $cur ) )
fi fi
} } &&
complete -F _sshow sshow complete -F _sshow sshow
# tcpkill(8) completion # tcpkill(8) completion
# #
have tcpkill &&
_tcpkill() _tcpkill()
{ {
local cur prev local cur prev
@ -202,11 +210,12 @@ _tcpkill()
COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- $cur ) ) COMPREPLY=( $( compgen -W '-i -1 -2 -3 -4 -5 -6 -7 -8 -9' -- $cur ) )
fi fi
} } &&
complete -F _tcpkill tcpkill complete -F _tcpkill tcpkill
# tcpnice(8) completion # tcpnice(8) completion
# #
have tcpnice &&
_tcpnice() _tcpnice()
{ {
local cur prev local cur prev
@ -226,11 +235,12 @@ _tcpnice()
COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) ) COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) )
fi fi
} } &&
complete -F _tcpnice tcpnice complete -F _tcpnice tcpnice
# urlsnarf(8) completion # urlsnarf(8) completion
# #
have urlsnarf &&
_urlsnarf() _urlsnarf()
{ {
local cur prev local cur prev
@ -250,11 +260,12 @@ _urlsnarf()
COMPREPLY=( $( compgen -W '-n -i -v' -- $cur ) ) COMPREPLY=( $( compgen -W '-n -i -v' -- $cur ) )
fi fi
} } &&
complete -F _urlsnarf urlsnarf complete -F _urlsnarf urlsnarf
# webmitm(8) completion # webmitm(8) completion
# #
have webmitm &&
_webmitm() _webmitm()
{ {
local cur local cur
@ -268,5 +279,5 @@ _webmitm()
_known_hosts _known_hosts
fi fi
} } &&
complete -F _webmitm webmitm complete -F _webmitm webmitm

View File

@ -5,6 +5,7 @@
# globs and contains Linux specific code for completing the parameter # globs and contains Linux specific code for completing the parameter
# to the -fstype option. # to the -fstype option.
have find &&
_find() _find()
{ {
local cur prev i exprfound onlyonce local cur prev i exprfound onlyonce
@ -111,5 +112,5 @@ _find()
_filedir _filedir
return 0 return 0
} } &&
complete -F _find $filenames find complete -F _find $filenames find

View File

@ -3,6 +3,7 @@
# #
# civserver completion by Guillaume Rousse <rousse@ccr.jussieu.fr> # civserver completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
have civserver &&
_civserver() _civserver()
{ {
local cur prev local cur prev
@ -25,11 +26,12 @@ _civserver()
-- $cur ) ) -- $cur ) )
fi fi
} } &&
complete -F _civserver civserver complete -F _civserver civserver
# civclient completion by Guillaume Rousse <rousse@ccr.jussieu.fr> # civclient completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
# #
have civclient &&
_civclient() _civclient()
{ {
local cur prev local cur prev
@ -60,5 +62,5 @@ _civclient()
-- $cur ) ) -- $cur ) )
fi fi
} } &&
complete -F _civclient civclient complete -F _civclient civclient

View File

@ -4,6 +4,7 @@
# bash programmable completion for various Common Lisp implementations by # bash programmable completion for various Common Lisp implementations by
# Nikodemus Siivola <nikodemus@random-state.net> # Nikodemus Siivola <nikodemus@random-state.net>
have gcl &&
_gcl() _gcl()
{ {
local cur local cur
@ -21,5 +22,5 @@ _gcl()
fi fi
return 0 return 0
} } &&
complete -F _gcl -o default gcl complete -F _gcl $default gcl

View File

@ -3,6 +3,7 @@
# #
# gkrellm(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr> # gkrellm(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
have gkrellm || have gkrellm2 &&
_gkrellm() _gkrellm()
{ {
local cur prev local cur prev
@ -33,5 +34,5 @@ _gkrellm()
--port' -- $cur ) ) --port' -- $cur ) )
fi fi
} } &&
complete -F _gkrellm gkrellm gkrellm2 complete -F _gkrellm gkrellm gkrellm2

View File

@ -3,6 +3,7 @@
# #
# Gnatmake completion by Ralf_Schroth@t-online.de (Ralf Schroth) # Gnatmake completion by Ralf_Schroth@t-online.de (Ralf Schroth)
have gnatmake &&
_gnatmake() _gnatmake()
{ {
local cur local cur
@ -28,5 +29,5 @@ _gnatmake()
_filedir '@(adb|ads)' _filedir '@(adb|ads)'
fi fi
} } &&
complete -F _gnatmake -o filenames gnatmake complete -F _gnatmake $filenames gnatmake

View File

@ -3,11 +3,12 @@
# #
# isql completion by Victor Bogado da Silva Lins <victor@bogado.net> # isql completion by Victor Bogado da Silva Lins <victor@bogado.net>
have isql &&
_isql() _isql()
{ {
local cur local cur
cur=`_get_cword` cur=`_get_cword`
[ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\[$cur "$ODBCINI" | tr -d \\[\\] ) ) [ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\[$cur "$ODBCINI" | tr -d \\[\\] ) )
} } &&
complete -F _isql isql complete -F _isql isql

View File

@ -3,6 +3,7 @@
# #
# larch(1) completion by Alex Shinn <foof@synthcode.com> # larch(1) completion by Alex Shinn <foof@synthcode.com>
have larch &&
_larch() _larch()
{ {
local cur prev local cur prev
@ -35,5 +36,5 @@ notify-library notify-browser push-new-revisions sendmail-mailx' $cur ))
fi fi
return 0 return 0
} } &&
complete -F _larch -o default larch complete -F _larch $default larch

View File

@ -4,6 +4,7 @@
# bash programmable completion for various Common Lisp implementations by # bash programmable completion for various Common Lisp implementations by
# Nikodemus Siivola <nikodemus@random-state.net> # Nikodemus Siivola <nikodemus@random-state.net>
have lisp &&
_lisp() _lisp()
{ {
local cur local cur
@ -22,5 +23,5 @@ _lisp()
fi fi
return 0 return 0
} } &&
complete -F _lisp -o default lisp complete -F _lisp $default lisp

View File

@ -3,6 +3,7 @@
# #
# mcrypt(1) completion by Ariel Fermani <the_end@bbs.frc.utn.edu.ar> # mcrypt(1) completion by Ariel Fermani <the_end@bbs.frc.utn.edu.ar>
have mcrypt || have mdecrypt &&
_mcrypt() _mcrypt()
{ {
local cur prev i decrypt local cur prev i decrypt
@ -76,5 +77,5 @@ _mcrypt()
_filedir _filedir
fi fi
fi fi
} } &&
complete -o filenames -F _mcrypt mcrypt mdecrypt complete $filenames -F _mcrypt mcrypt mdecrypt

View File

@ -3,6 +3,7 @@
# #
# mtx completion by Jon Middleton <jjm@ixtab.org.uk> # mtx completion by Jon Middleton <jjm@ixtab.org.uk>
have mtx &&
_mtx() _mtx()
{ {
local cur prev options tapes drives local cur prev options tapes drives
@ -42,5 +43,5 @@ _mtx()
COMPREPLY=( $( compgen -W "$options" -- $cur ) ) COMPREPLY=( $( compgen -W "$options" -- $cur ) )
fi fi
return 0 return 0
} } &&
complete -F _mtx mtx complete -F _mtx mtx

View File

@ -3,6 +3,7 @@
# #
# Perforce completion by Frank Cusack <frank@google.com> # Perforce completion by Frank Cusack <frank@google.com>
have p4 &&
_p4() _p4()
{ {
local cur prev prev2 p4commands p4filetypes local cur prev prev2 p4commands p4filetypes
@ -51,5 +52,5 @@ _p4()
fi fi
return 0 return 0
} } &&
complete -F _p4 $default p4 g4 complete -F _p4 $default p4 g4

View File

@ -3,6 +3,7 @@
# #
# povray completion by "David Necas (Yeti)" <yeti@physics.muni.cz> # povray completion by "David Necas (Yeti)" <yeti@physics.muni.cz>
have povray || have xpovray || have spovray &&
_povray() _povray()
{ {
local cur prev povcur pfx oext defoext local cur prev povcur pfx oext defoext
@ -55,5 +56,5 @@ _povray()
return 0 return 0
;; ;;
esac esac
} } &&
complete -F _povray $filenames povray xpovray spovray complete -F _povray $filenames povray xpovray spovray

View File

@ -3,6 +3,7 @@
# #
# ri completion for Ruby documentation by Ian Macdonald <ian@caliban.org> # ri completion for Ruby documentation by Ian Macdonald <ian@caliban.org>
have ri && {
ri_get_methods() ri_get_methods()
{ {
local regex local regex
@ -87,3 +88,4 @@ _ri()
ri_get_methods ri_get_methods
} }
complete -F _ri ri complete -F _ri ri
}

View File

@ -4,6 +4,7 @@
# bash programmable completion for various Common Lisp implementations by # bash programmable completion for various Common Lisp implementations by
# Nikodemus Siivola <nikodemus@random-state.net> # Nikodemus Siivola <nikodemus@random-state.net>
have sbcl || have sbcl-mt &&
_sbcl() _sbcl()
{ {
local cur local cur
@ -21,5 +22,5 @@ _sbcl()
fi fi
return 0 return 0
} } &&
complete -F _sbcl $default sbcl sbcl-mt complete -F _sbcl $default sbcl sbcl-mt

View File

@ -5,6 +5,7 @@
# Copyright 2003 Eelco Lempsink <eelcolempsink@gmx.net> # Copyright 2003 Eelco Lempsink <eelcolempsink@gmx.net>
# License: GNU GPL v2 or later # License: GNU GPL v2 or later
have sitecopy &&
_sitecopy() _sitecopy()
{ {
local cur local cur
@ -27,5 +28,5 @@ _sitecopy()
esac esac
return 0 return 0
} } &&
complete -F _sitecopy $default sitecopy complete -F _sitecopy $default sitecopy

View File

@ -3,6 +3,7 @@
# #
# snownews completion by Guillaume Rousse <rousse@ccr.jussieu.fr> # snownews completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
have snownews &&
_snownews() _snownews()
{ {
local cur local cur
@ -15,5 +16,5 @@ _snownews()
COMPREPLY=( $( compgen -W '--update --help --version \ COMPREPLY=( $( compgen -W '--update --help --version \
--disable-versioncheck -u -h -V' -- $cur)) --disable-versioncheck -u -h -V' -- $cur))
fi fi
} } &&
complete -F _snownews snownews complete -F _snownews snownews

View File

@ -3,6 +3,7 @@
# #
# svk completion by Guillaume Rousse <guillomovitch@zarb.org> # svk completion by Guillaume Rousse <guillomovitch@zarb.org>
have svk &&
_svk() _svk()
{ {
local cur prev commands options command local cur prev commands options command
@ -259,5 +260,5 @@ _svk()
fi fi
return 0 return 0
} } &&
complete -F _svk $filenames svk complete -F _svk $filenames svk

View File

@ -3,6 +3,7 @@
# #
# bash completion for GNU tar # bash completion for GNU tar
have tar && {
_tar() _tar()
{ {
local cur ext regex tar untar local cur ext regex tar untar
@ -64,3 +65,4 @@ _tar()
} }
[ -n "${COMP_TAR_INTERNAL_PATHS:-}" ] && complete -F _tar $dirnames tar || [ -n "${COMP_TAR_INTERNAL_PATHS:-}" ] && complete -F _tar $dirnames tar ||
complete -F _tar $filenames tar complete -F _tar $filenames tar
}

View File

@ -3,6 +3,7 @@
# #
# unace(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr> # unace(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
have unace &&
_unace() _unace()
{ {
local cur local cur
@ -25,5 +26,5 @@ _unace()
return 0 return 0
} } &&
complete -F _unace $filenames unace complete -F _unace $filenames unace

View File

@ -3,6 +3,7 @@
# #
# unrar(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr> # unrar(1) completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
have unrar &&
_unrar() _unrar()
{ {
local cur local cur
@ -26,5 +27,5 @@ _unrar()
esac esac
return 0 return 0
} } &&
complete -F _unrar $filenames unrar complete -F _unrar $filenames unrar

View File

@ -3,7 +3,7 @@
# #
# bash completion for vncviewer # bash completion for vncviewer
have vncviewer &&
_vncviewer_bootstrap() { _vncviewer_bootstrap() {
local fname local fname
case "$(_realcommand vncviewer)" in case "$(_realcommand vncviewer)" in
@ -21,7 +21,7 @@ _vncviewer_bootstrap() {
} && } &&
complete -F _vncviewer_bootstrap vncviewer complete -F _vncviewer_bootstrap vncviewer
have tightvncviewer &&
_tightvncviewer() _tightvncviewer()
{ {
local cur prev local cur prev
@ -62,6 +62,7 @@ complete -F _tightvncviewer tightvncviewer
# NOTE: - VNC Viewer options are case-insensivite. Preferred case is taken from -help. # NOTE: - VNC Viewer options are case-insensivite. Preferred case is taken from -help.
# - Both single dash (-) and double dash (--) are allowed as option prefix # - Both single dash (-) and double dash (--) are allowed as option prefix
have xvnc4viewer &&
_xvnc4viewer() _xvnc4viewer()
{ {
local cur prev local cur prev

View File

@ -3,7 +3,7 @@
# #
# bash completion for cdrecord/wodim # bash completion for cdrecord/wodim
(have cdrecord || have wodim) && have cdrecord || have wodim &&
_cdrecord() _cdrecord()
{ {
local cur prev i generic_options track_options track_mode local cur prev i generic_options track_options track_mode