summaryrefslogtreecommitdiff
path: root/nonprism/claws-mail/bash_completion
blob: dcbcc89207593e54923f010087220e72994b556d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# claws-mail(1) completion
_claws-mail()
{
	local cur prev words cword
	_init_completion || return

	case $prev in
	--help|-h|--version|-v|--version-full|-V)
		return
		;;
	--alternate-config-dir)
		COMPREPLY=( $( find . -maxdepth 2 -name clawsrc | sed 's,/clawsrc,,' ) )
		return
		;;
	--select|--status|--status-full)
		_filedir -d
		return
		;;
	--compose-from-file|--attach)
		_filedir
		return
		;;
	esac

	if [[ $cur == -* ]]; then
		COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
		return
	fi
} &&
complete -F _claws-mail claws-mail