blob: 2fdf549eb993236806f8abe57a4e95ff4af3aee8 (
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
|
# 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
--num-results
--selection-color
--selection-match-color
--selection-padding
--selection-background
--outline-width
--outline-color
--prompt-text
--prompt-padding
--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
--horizontal
--hide-cursor
--history
--fuzzy-match
--require-match
--hide-input
--hidden-character
--drun-launch
--terminal
--hint-font
--late-keyboard-init
)
case "${prev}" in
--font)
;&
--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
|