blob: ea9b6dec4fe25dcc4b6c33305a4a25197a1587cc (
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
|
# vi: ft=bash
_tofi()
{
local cur prev words cword
_init_completion || return
words=(
--help
--config
--output
--anchor
--background-color
--corner-radius
--font
--font-size
--num-results
--selection-color
--selection-background
--outline-width
--outline-color
--prompt-text
--result-spacing
--min-input-width
--border-width
--border-color
--text-color
--width
--height
--margin-top
--margin-bottom
--margin-left
--margin-right
--padding-top
--padding-bottom
--padding-left
--padding-right
--horizontal
--hide-cursor
--history
--hint-font
--late-keyboard-init
)
case "${prev}" in
--font)
;&
--config|-c)
_filedir
return 0
;;
--help|-h)
;;
--late-keyboard-init)
;;
--*)
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
|