@@ -86,6 +86,7 @@ _lstopo() {
86
86
)
87
87
local cur=${COMP_WORDS[COMP_CWORD]}
88
88
local prev=${COMP_WORDS[COMP_CWORD-1]}
89
+ COMPREPLY=()
89
90
90
91
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
91
92
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -136,7 +137,7 @@ _lstopo() {
136
137
COMPREPLY=( "<line of text>" "" )
137
138
;;
138
139
--palette)
139
- COMPREPLY=( `compgen -W "grey" " greyscale" " default" " colors" " white" " none" -- "$cur"` )
140
+ COMPREPLY=( `compgen -W "grey greyscale default colors white none" -- "$cur"` )
140
141
;;
141
142
--binding-color | --disallowed-color | --top-color)
142
143
COMPREPLY=( `compgen -W "none <#rrggbb>" -- "$cur"` )
@@ -159,6 +160,7 @@ complete -F _lstopo hwloc-ls
159
160
160
161
161
162
_hwloc_info(){
163
+ local INPUT_FORMAT=(xml synthetic fsroot cpuid)
162
164
local TYPES=("Machine" "Misc" "Group" "NUMANode" "MemCache" "Package" "Die" "L1" "L2" "L3" "L4" "L5" "L1i" "L2i" "L3i" "Core" "Bridge" "PCIDev" "OSDev" "PU")
163
165
local FILTERKINDS=("none" "all" "structure" "important")
164
166
local OPTIONS=(--objects
@@ -195,6 +197,7 @@ _hwloc_info(){
195
197
)
196
198
local cur=${COMP_WORDS[COMP_CWORD]}
197
199
local prev=${COMP_WORDS[COMP_CWORD-1]}
200
+ COMPREPLY=()
198
201
199
202
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
200
203
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -223,7 +226,8 @@ _hwloc_info(){
223
226
COMPREPLY=( `compgen -W "${TYPES[*]/%/:} cache: icache: io:" -- "$cur"` ) && compopt -o nospace
224
227
;;
225
228
--ancestor | --descendants)
226
- COMPREPLY=( `compgen -W "${TYPES[*]}" -- "$cur"` kind=normal kind=cpu kind=cache kind=memory kind=io kind=all )
229
+ COMPREPLY=( `compgen -W "${TYPES[*]} kind=normal kind=cpu kind=cache kind=memory kind=io kind=all" -- "$cur"` )
230
+ # TODO "kind=<tab>" doesn't complete with kinds
227
231
;;
228
232
--local-memory-flags)
229
233
COMPREPLY=( "<flags>" "" )
@@ -269,6 +273,7 @@ _hwloc_bind(){
269
273
)
270
274
local cur=${COMP_WORDS[COMP_CWORD]}
271
275
local prev=${COMP_WORDS[COMP_CWORD-1]}
276
+ COMPREPLY=()
272
277
273
278
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
274
279
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -302,6 +307,7 @@ complete -F _hwloc_bind hwloc-bind
302
307
303
308
304
309
_hwloc_calc(){
310
+ local INPUT_FORMAT=(xml synthetic fsroot cpuid)
305
311
local TYPES=("Machine" "Misc" "Group" "NUMANode" "MemCache" "Package" "Die" "L1" "L2" "L3" "L4" "L5" "L1i" "L2i" "L3i" "Core" "Bridge" "PCIDev" "OSDev" "PU")
306
312
local OPTIONS=(-N --number-of
307
313
-I --intersect
@@ -337,6 +343,7 @@ _hwloc_calc(){
337
343
)
338
344
local cur=${COMP_WORDS[COMP_CWORD]}
339
345
local prev=${COMP_WORDS[COMP_CWORD-1]}
346
+ COMPREPLY=()
340
347
341
348
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
342
349
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -384,6 +391,7 @@ complete -F _hwloc_calc hwloc-calc
384
391
_hwloc_annotate(){
385
392
local OPTIONS=(--ci --ri --cu --cd --version -h --help)
386
393
local cur=${COMP_WORDS[COMP_CWORD]}
394
+ COMPREPLY=()
387
395
388
396
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
389
397
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"`)
@@ -400,6 +408,7 @@ _hwloc_diff(){
400
408
)
401
409
local cur=${COMP_WORDS[COMP_CWORD]}
402
410
local prev=${COMP_WORDS[COMP_CWORD-1]}
411
+ COMPREPLY=()
403
412
404
413
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
405
414
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -417,11 +426,12 @@ complete -F _hwloc_diff hwloc-diff
417
426
418
427
419
428
_hwloc_patch(){
420
- local OPTIONS=(-- R --reverse
429
+ local OPTIONS=(-R --reverse
421
430
--version
422
431
-h --help
423
432
)
424
433
local cur=${COMP_WORDS[COMP_CWORD]}
434
+ COMPREPLY=()
425
435
426
436
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
427
437
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -438,6 +448,7 @@ _hwloc_compress_dir(){
438
448
-h --help
439
449
)
440
450
local cur=${COMP_WORDS[COMP_CWORD]}
451
+ COMPREPLY=()
441
452
442
453
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
443
454
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -448,6 +459,7 @@ complete -F _hwloc_compress_dir hwloc-compress-dir
448
459
449
460
450
461
_hwloc_distrib(){
462
+ local INPUT_FORMAT=(xml synthetic fsroot cpuid)
451
463
local TYPES=("Machine" "Misc" "Group" "NUMANode" "MemCache" "Package" "Die" "L1" "L2" "L3" "L4" "L5" "L1i" "L2i" "L3i" "Core" "Bridge" "PCIDev" "OSDev" "PU")
452
464
local OPTIONS=(--ignore
453
465
--from
@@ -467,6 +479,7 @@ _hwloc_distrib(){
467
479
)
468
480
local cur=${COMP_WORDS[COMP_CWORD]}
469
481
local prev=${COMP_WORDS[COMP_CWORD-1]}
482
+ COMPREPLY=()
470
483
471
484
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
472
485
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -520,6 +533,7 @@ _hwloc_ps(){
520
533
)
521
534
local cur=${COMP_WORDS[COMP_CWORD]}
522
535
local prev=${COMP_WORDS[COMP_CWORD-1]}
536
+ COMPREPLY=()
523
537
524
538
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
525
539
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -554,6 +568,7 @@ _hwloc_gather_cpuid(){
554
568
)
555
569
local cur=${COMP_WORDS[COMP_CWORD]}
556
570
local prev=${COMP_WORDS[COMP_CWORD-1]}
571
+ COMPREPLY=()
557
572
558
573
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
559
574
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
@@ -578,6 +593,7 @@ _hwloc_gather_topology(){
578
593
-h --help
579
594
)
580
595
local cur=${COMP_WORDS[COMP_CWORD]}
596
+ COMPREPLY=()
581
597
582
598
if [[ $COMP_CWORD == 1 || $cur == -* ]] ; then
583
599
COMPREPLY=( `compgen -W "${OPTIONS[*]}" -- "$cur"` )
0 commit comments