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>
have bk &&
_bk() {
local BKCMDS
@ -16,5 +17,5 @@ _bk() {
_filedir
return 0
}
} &&
complete -F _bk bk

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,6 +4,7 @@
# bash programmable completion for various Common Lisp implementations by
# Nikodemus Siivola <nikodemus@random-state.net>
have gcl &&
_gcl()
{
local cur
@ -21,5 +22,5 @@ _gcl()
fi
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>
have gkrellm || have gkrellm2 &&
_gkrellm()
{
local cur prev
@ -33,5 +34,5 @@ _gkrellm()
--port' -- $cur ) )
fi
}
} &&
complete -F _gkrellm gkrellm gkrellm2

View File

@ -3,6 +3,7 @@
#
# Gnatmake completion by Ralf_Schroth@t-online.de (Ralf Schroth)
have gnatmake &&
_gnatmake()
{
local cur
@ -28,5 +29,5 @@ _gnatmake()
_filedir '@(adb|ads)'
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>
have isql &&
_isql()
{
local cur
cur=`_get_cword`
[ -f "$ODBCINI" ] && COMPREPLY=( $( grep \\[$cur "$ODBCINI" | tr -d \\[\\] ) )
}
} &&
complete -F _isql isql

View File

@ -3,6 +3,7 @@
#
# larch(1) completion by Alex Shinn <foof@synthcode.com>
have larch &&
_larch()
{
local cur prev
@ -35,5 +36,5 @@ notify-library notify-browser push-new-revisions sendmail-mailx' $cur ))
fi
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
# Nikodemus Siivola <nikodemus@random-state.net>
have lisp &&
_lisp()
{
local cur
@ -22,5 +23,5 @@ _lisp()
fi
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>
have mcrypt || have mdecrypt &&
_mcrypt()
{
local cur prev i decrypt
@ -76,5 +77,5 @@ _mcrypt()
_filedir
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>
have mtx &&
_mtx()
{
local cur prev options tapes drives
@ -42,5 +43,5 @@ _mtx()
COMPREPLY=( $( compgen -W "$options" -- $cur ) )
fi
return 0
}
} &&
complete -F _mtx mtx

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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