Skip to content

Commit 21f7e32

Browse files
yedayakscop
authored andcommitted
feat(ip): Complete help for unknown subcommands
1 parent fddce99 commit 21f7e32

File tree

1 file changed

+6
-2
lines changed
  • completions

1 file changed

+6
-2
lines changed

completions/ip

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ _comp_cmd_ip()
451451
fi
452452
;;
453453
*)
454-
_comp_compgen -- -W 'show'
454+
((cword == subcword)) && _comp_compgen -- -W 'help show'
455455
;;
456456
esac
457457
;;
@@ -463,10 +463,14 @@ _comp_cmd_ip()
463463
;;
464464
*)
465465
((cword == subcword)) &&
466-
_comp_compgen -- -W 'state policy monitor'
466+
_comp_compgen -- -W 'help state policy monitor'
467467
;;
468468
esac
469469
;;
470+
help) ;;
471+
*)
472+
_comp_compgen -- -W 'help'
473+
;;
470474
esac
471475
} &&
472476
complete -F _comp_cmd_ip ip

0 commit comments

Comments
 (0)