PageRenderTime 26ms CodeModel.GetById 24ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/bash_completion_lib/complete/tcpnice

http://github.com/brinkman83/bashrc
#! | 25 lines | 18 code | 7 blank | 0 comment | 0 complexity | 38817ea7b9a0702fdc43455b05ba55a8 MD5 | raw file
 1# tcpnice(8) completion
 2
 3
 4comp_include _get_cword
 5
 6
 7_tcpnice()
 8{
 9	local cur
10
11	COMPREPLY=()
12	cur=`_get_cword`
13	prev=${COMP_WORDS[COMP_CWORD-1]}
14
15	case "$prev" in
16		-i)
17			_interfaces
18			return 0
19			;;
20	esac
21
22	if [[ "$cur" == -* ]]; then
23		COMPREPLY=( $( compgen -W '-A -I -M -i' -- $cur ) )
24	fi
25} # _tcpnice()