PageRenderTime 122ms CodeModel.GetById 119ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion_lib/complete/arpspoof

http://github.com/brinkman83/bashrc
#! | 37 lines | 27 code | 10 blank | 0 comment | 0 complexity | b8a193eb60ab5a1b2e9abd5524c2fc86 MD5 | raw file
 1# dsniff util completion by Guillaume Rousse <rousse@ccr.jussieu.fr>
 2#
 3# $Id: dsniff,v 1.2 2003/12/31 08:22:37 ianmacd Exp $
 4
 5# arpspoof(8) completion
 6
 7
 8comp_include _get_cword _known_hosts
 9
10
11_arpspoof()
12{
13	local cur
14
15	COMPREPLY=()
16	cur=`_get_cword`
17	prev=${COMP_WORDS[COMP_CWORD-1]}
18
19	case "$prev" in
20		-i)
21			_interfaces
22			return 0
23			;;
24		-t)
25			_known_hosts
26			return 0
27			;;
28	esac
29
30	if [[ "$cur" == -* ]]; then
31		COMPREPLY=( $( compgen -W '-i -t' -- $cur ) )
32	else
33		_known_hosts
34	fi
35} # _arpspoof()
36
37