summaryrefslogtreecommitdiff
path: root/completions/tofi
blob: 328f7dcb182ae36f9ae2d7b1beeb1334101de2d1 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# vi: ft=bash

_tofi()
{
	local cur prev words cword
	_init_completion || return

	words=(
		--help
		--config
		--include
		--output
		--scale
		--anchor
		--background-color
		--corner-radius
		--font
		--font-size
		--font-features
		--font-variations
		--num-results
		--selection-color
		--selection-match-color
		--selection-background
		--selection-background-padding
		--selection-background-corner-radius
		--outline-width
		--outline-color
		--prompt-text
		--prompt-padding
		--prompt-color
		--prompt-background
		--prompt-background-padding
		--prompt-background-corner-radius
		--placeholder-text
		--placeholder-color
		--placeholder-background
		--placeholder-background-padding
		--placeholder-background-corner-radius
		--input-color
		--input-background
		--input-background-padding
		--input-background-corner-radius
		--default-result-color
		--default-result-background
		--default-result-background-padding
		--default-result-background-corner-radius
		--alternate-result-color
		--alternate-result-background
		--alternate-result-background-padding
		--alternate-result-background-corner-radius
		--result-spacing
		--min-input-width
		--border-width
		--border-color
		--text-color
		--width
		--height
		--exclusive-zone
		--margin-top
		--margin-bottom
		--margin-left
		--margin-right
		--padding-top
		--padding-bottom
		--padding-left
		--padding-right
		--clip-to-padding
		--horizontal
		--hide-cursor
		--history
		--history-file
		--fuzzy-match
		--require-match
		--hide-input
		--hidden-character
		--drun-launch
		--terminal
		--hint-font
		--late-keyboard-init
		--multi-instance
     )

	case "${prev}" in
		--font)
			;&
		--history-file)
			;&
		--include)
			;&
		--config|-c)
			_filedir
			return 0
			;;
		--help|-h)
			;;
		--*)
			return 0
			;;
	esac
	case "${cur}" in
		-[ch])
			COMPREPLY=($cur)
			;;
		*)
			COMPREPLY=($(compgen -W "${words[*]}" -- ${cur}))
			return 0
			;;
	esac
}
complete -F _tofi tofi
complete -F _tofi tofi-run
complete -F _tofi tofi-drun