haiku/data/etc/bash_completion.d/nmap
Brecht Machiels 4a135b33b7 * upgraded bash_completion to v1.3
* upgraded to subversion bash completion script shipped with subversion 1.6.17
* added git bash completion script shipped with git 1.7.5.4
* readded bash completion to the image

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-19 21:19:36 +00:00

61 lines
1.9 KiB
Bash

# bash completion for nmap
have nmap &&
_nmap()
{
local cur prev
COMPREPLY=()
cur=`_get_cword`
prev=`_get_pword`
case $prev in
-iL|-oN|-oX|-oS|-oG|---excludefile|--resume|--stylesheet)
_filedir
return 0
;;
-oA|--datadir)
_filedir -d
return 0
;;
-e)
_available_interfaces
return 0
;;
-b|--dns-servers)
_known_hosts_real "$cur"
return 0
;;
esac
if [[ "$cur" == -* ]]; then
COMPREPLY=( $( compgen -W '-iL -iR --exclude --excludefile -sL -sP \
-PN -PS -PA -PU -PY -PE -PP -PM -PO -n -R --dns-servers \
--system-dns --traceroute -sS -sT -sA -sW -sM -sU -sN -sF -sX \
--scanflags -sI -sY -sZ -sO -b -p -F -r --top-ports --port-ratio \
-sV --version-intensity --version-light --version-all \
--version-trace -sC --script= --script-args= --script-trace \
--script-updatedb -O --osscan-limit --osscan-guess -T0 -T1 -T2 -T3 \
-T4 -T5 --min-hostgroup --max-hostgroup --min-parallelism \
--max-parallelism --min-rtt-timeout --max-rtt-timeout \
--initial-rtt-timeout --max-retries --host-timeout --scan-delay \
--max-scan-delay --min-rate --max-rate -f --mtu -D -S -e \
--source-port --data-length --ip-options --ttl --spoof-mac \
--badsum --adler32 -oN -oX -oS -oG -oA -v -d --reason --open \
--packet-trace --iflist --log-errors --append-output --resume \
--stylesheet --webxml --no-stylesheet -6 -A --datadir --send-eth \
--send-ip --privilege--unprivileged -V -h' -- "$cur" ) )
else
_known_hosts_real "$cur"
fi
} &&
complete -F _nmap nmap
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh