File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ _flux_submit_commands()
523523# flux-resource(1) completions
524524_flux_resource()
525525{
526- local subcmds="drain undrain status list R info reload"
526+ local subcmds="drain undrain status list R info reload eventlog "
527527 local cmd=$1
528528 local split=false
529529 local states
@@ -570,15 +570,35 @@ _flux_resource()
570570 -q --queue= \
571571 -i --include= \
572572 "
573+ local eventlog_OPTS="\
574+ -h --help \
575+ -f --format= \
576+ -T --time-format=
577+ -L --color= \
578+ -F --follor \
579+ -w --wait-event= \
580+ "
581+
573582 _flux_split_longopt && split=true
574583 case $prev in
575584 --queue | -!(-*)q)
576585 _flux_complete_queue
577586 return
578587 ;;
579- --format | -!(-*)o)
580- _flux_complete_format_name flux resource $cmd
581- return
588+ --format | -!(-*)o | -!(-*)f)
589+ case $cmd in
590+ eventlog)
591+ COMPREPLY=( $(compgen -W "text json" -- "$cur") )
592+ return
593+ ;;
594+ *)
595+ # Only eventlog takes -f as format
596+ if test "$prev" != "-f"; then
597+ _flux_complete_format_name flux resource $cmd
598+ return
599+ fi
600+ ;;
601+ esac
582602 ;;
583603 --states | -!(-*)s)
584604 case $cmd in
You can’t perform that action at this time.
0 commit comments