File tree Expand file tree Collapse file tree 17 files changed +33
-33
lines changed Expand file tree Collapse file tree 17 files changed +33
-33
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ _comp_cmd_7z()
15
15
16
16
case $cur in
17
17
-ao* )
18
- COMPREPLY=( $( compgen - P" ${cur: 0: 3} " -W ' a s t u' -- " ${cur : 3} " ) )
18
+ _comp_compgen -c " ${cur : 3} " -- - P" ${cur: 0: 3} " -W ' a s t u'
19
19
return
20
20
;;
21
21
-? (a)[ix]* )
@@ -31,33 +31,33 @@ _comp_cmd_7z()
31
31
elif [[ $cur == ? (r@ (-| 0| ))@* ]]; then
32
32
local IFS=$' \t\n ' reset=$( shopt -po noglob)
33
33
set -o noglob
34
- COMPREPLY=( $( compgen - P" ${opt}${cur%%@* } @" -f -- " ${cur #*@ } " ) )
34
+ _comp_compgen -c " ${cur #*@ } " -- - P" ${opt}${cur%%@* } @" -f
35
35
$reset
36
36
compopt -o filenames
37
37
fi
38
38
return
39
39
;;
40
40
-mhe=* | -mhc=* | -ms=* | -mt=* )
41
- COMPREPLY=( $( compgen -W ' on off ' -- " ${cur#* =} " ) )
41
+ _comp_compgen -c " ${cur#* =} " -- -W ' on off '
42
42
return
43
43
;;
44
44
-mx=* )
45
- COMPREPLY=( $( compgen - W ' 0 1 3 5 7 9' -- " ${cur #* =} " ) )
45
+ _comp_compgen -c " ${cur #* =} " -- - W ' 0 1 3 5 7 9'
46
46
return
47
47
;;
48
48
-o* | -w?* )
49
49
local reset=$( shopt -po noglob)
50
50
set -o noglob
51
51
compopt -o filenames
52
52
local IFS=$' \n '
53
- COMPREPLY=( $( compgen -d -P " ${cur: 0 : 2} " -S/ -- " ${cur: 2} " ) )
53
+ _comp_compgen -c " ${cur: 2} " -- -d -P " ${cur: 0 : 2} " -S/
54
54
_comp_unlocal IFS
55
55
$reset
56
56
compopt -o nospace
57
57
return
58
58
;;
59
59
-r?* )
60
- COMPREPLY=( $( compgen -P " ${cur: 0 : 2} " -W ' - 0 ' -- " ${cur: 2} " ) )
60
+ _comp_compgen -c " ${cur: 2} " -- -P " ${cur: 0 : 2} " -W ' - 0 '
61
61
return
62
62
;;
63
63
-scs* )
@@ -66,7 +66,7 @@ _comp_cmd_7z()
66
66
return
67
67
;;
68
68
-ssc?* )
69
- COMPREPLY=( $( compgen -P " ${cur: 0 : 4} " -W ' - ' -- " ${cur: 4} " ) )
69
+ _comp_compgen -c " ${cur: 4} " -- -P " ${cur: 0 : 4} " -W ' - '
70
70
return
71
71
;;
72
72
-t* )
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ _comp_cmd_umount__reply_compgen_array()
28
28
29
29
# Actually generate completions.
30
30
local IFS=$' \n '
31
- COMPREPLY=( $( compgen -W " $wlist " -- " ${ecur} " ) )
31
+ _comp_compgen -c " ${ecur} " -- -W " $wlist "
32
32
_comp_unlocal IFS
33
33
}
34
34
Original file line number Diff line number Diff line change @@ -15,14 +15,14 @@ _comp_cmd_dot()
15
15
local langs=($( " $1 " -TNON_EXISTENT 2>&1 |
16
16
command sed -ne ' s/.*one of://p' ) )
17
17
(( ${# langs[@]} )) &&
18
- COMPREPLY=( $( compgen - P -T -W ' "${langs[@]}"' -- " ${cur # -T} " ) )
18
+ _comp_compgen -c " ${cur # -T} " -- - P -T -W ' "${langs[@]}"'
19
19
return
20
20
;;
21
21
-K* )
22
22
local layouts=($( " $1 " -KNON_EXISTENT 2>&1 |
23
23
command sed -ne ' s/.*one of://p' ) )
24
24
(( ${# layouts[@]} )) &&
25
- COMPREPLY=( $( compgen - P -K -W ' "${layouts[@]}"' -- " ${cur # -K} " ) )
25
+ _comp_compgen -c " ${cur # -K} " -- - P -K -W ' "${layouts[@]}"'
26
26
return
27
27
;;
28
28
-o* )
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ _comp_cmd_fbgs()
18
18
return
19
19
;;
20
20
-d | --device)
21
- COMPREPLY=( $( compgen -f -d -- " ${cur:-/ dev/ } " ) )
21
+ _comp_compgen -c " ${cur:-/ dev/ } " -- -f -d
22
22
return
23
23
;;
24
24
-fp | --firstpage | -lp | --lastpage | -r | --resolution | -s | --scroll | -t | \
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ _comp_cmd_fbi()
26
26
return
27
27
;;
28
28
-d | --device)
29
- COMPREPLY=( $( compgen -f -d -- " ${cur:-/ dev/ } " ) )
29
+ _comp_compgen -c " ${cur:-/ dev/ } " -- -f -d
30
30
return
31
31
;;
32
32
--cachemem | --blend | -T | --vt | -s | --scroll | -t | --timeout | -g | --gamma)
Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ _comp_cmd_java()
160
160
case $cur in
161
161
# standard option completions
162
162
-verbose:* )
163
- COMPREPLY=( $( compgen -W ' class gc jni ' -- " ${cur#*: } " ) )
163
+ _comp_compgen -c " ${cur#*: } " -- -W ' class gc jni '
164
164
return
165
165
;;
166
166
-javaagent:* )
@@ -181,7 +181,7 @@ _comp_cmd_java()
181
181
return
182
182
;;
183
183
-Xcheck:* )
184
- COMPREPLY=( $( compgen -W ' jni ' -- " ${cur#*: } " ) )
184
+ _comp_compgen -c " ${cur#*: } " -- -W ' jni '
185
185
return
186
186
;;
187
187
-Xgc:* )
@@ -199,7 +199,7 @@ _comp_cmd_java()
199
199
return
200
200
;;
201
201
-Xshare:* )
202
- COMPREPLY=( $( compgen -W ' auto off on ' -- " ${cur#*: } " ) )
202
+ _comp_compgen -c " ${cur#*: } " -- -W ' auto off on '
203
203
return
204
204
;;
205
205
-Xverbose:* )
@@ -208,7 +208,7 @@ _comp_cmd_java()
208
208
return
209
209
;;
210
210
-Xverify:* )
211
- COMPREPLY=( $( compgen -W ' all none remote ' -- " ${cur#*: } " ) )
211
+ _comp_compgen -c " ${cur#*: } " -- -W ' all none remote '
212
212
return
213
213
;;
214
214
# the rest that we have no completions for
@@ -316,7 +316,7 @@ _comp_cmd_javac()
316
316
# the others.
317
317
local opts=$( " $1 " $helpopt 2>&1 | command sed -e ' s/-g:none/-g:{none}/' -ne \
318
318
" s/^[[:space:]]*${cur%%:* } :{\([^}]\{1,\}\)}.*/\1/p" )
319
- COMPREPLY=( $( compgen -W " ${opts // , / } " -- " ${cur #*: } " ) )
319
+ _comp_compgen -c " ${cur #*: } " -- -W " ${opts // , / } "
320
320
return
321
321
fi
322
322
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ _comp_cmd_mutt__filedir()
141
141
# Match any file in $folder beginning with $cur
142
142
# (minus the leading '=' sign).
143
143
compopt -o filenames
144
- COMPREPLY=( $( compgen -f -- " $folder /${cur: 1} " ) )
144
+ _comp_compgen -c " $folder /${cur: 1} " -- -f
145
145
COMPREPLY=(${COMPREPLY[@]# $folder / } )
146
146
return
147
147
elif [[ $cur == ! * ]]; then
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ _comp_cmd_mypy()
25
25
return
26
26
;;
27
27
--python-executable)
28
- COMPREPLY=( $( compgen -c -- " ${cur:- py} " ) )
28
+ _comp_compgen -c " ${cur:- py} " -- -c
29
29
return
30
30
;;
31
31
--* -dir | --* -report)
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ _comp_cmd_perltidy()
21
21
return
22
22
;;
23
23
-ole=* | --output-line-ending=* )
24
- COMPREPLY=( $( compgen - W ' dos win mac unix' -- " ${cur #* =} " ) )
24
+ _comp_compgen -c " ${cur #* =} " -- - W ' dos win mac unix'
25
25
return
26
26
;;
27
27
-bt=* | --brace-tightness=* | -pt=* | --paren-tightness=* | \
@@ -35,15 +35,15 @@ _comp_cmd_perltidy()
35
35
-cti=* | --closing-token-indentation=* | \
36
36
-kbl=* | --keep-old-blank-lines=* | \
37
37
-vt=* | --vertical-tightness=* )
38
- COMPREPLY=( $( compgen -W ' 0 1 2 ' -- " ${cur#* =} " ) )
38
+ _comp_compgen -c " ${cur#* =} " -- -W ' 0 1 2 '
39
39
return
40
40
;;
41
41
-vtc=* | --vertical-tightness-closing=* )
42
- COMPREPLY=( $( compgen -W ' 0 1 ' -- " ${cur#* =} " ) )
42
+ _comp_compgen -c " ${cur#* =} " -- -W ' 0 1 '
43
43
return
44
44
;;
45
45
-cab=* | --comma-arrow-breakpoints=* )
46
- COMPREPLY=( $( compgen - W ' 0 1 2 3' -- " ${cur #* =} " ) )
46
+ _comp_compgen -c " ${cur #* =} " -- - W ' 0 1 2 3'
47
47
return
48
48
;;
49
49
-* =)
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ _comp_cmd_pkg_delete()
9
9
10
10
[[ $prev == -o || $prev == -p || $prev == -W ]] && return
11
11
12
- COMPREPLY=( $( compgen -d -- " $pkgdir$cur " ) )
12
+ _comp_compgen -c " $pkgdir$cur " -- -d
13
13
(( ${# COMPREPLY[@]} == 0 )) || COMPREPLY=(${COMPREPLY[@]# $pkgdir } )
14
14
15
15
} &&
You can’t perform that action at this time.
0 commit comments