summaryrefslogblamecommitdiffstats
path: root/bash-completion/raw
blob: 27f0354544b4ed826c08f3b30c78e83588454888 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                                             
_raw_module()
{
	local cur
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	case $cur in
		-*)
			local OPTS
			OPTS="-q --query -a --all -h --help -V --version"
			COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
			return 0
			;;
	esac
	COMPREPLY=( $(compgen -W "$(for I in /dev/raw/*; do if [ -e $I ]; then echo $I; fi; done)" -- $cur) )
	return 0
}
complete -F _raw_module raw