File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -247,13 +247,14 @@ function cmd_count() {
247247}
248248
249249/**
250- * Hide command unless options `--show-hidden` is specified.
251- * @param { string | boolean } description - to display when comand is showed,
250+ * Hide command unless the option `--show-hidden` is specified.
251+ * @param { string | boolean } description - to display when comand is showed.
252+ * @param { integer } level - used to compare with command count.
252253 * @return Return a string to show command, else we return false.
253254 */
254- function hide_cmd ( description ) {
255+ function hide_cmd ( description , level = 1 ) {
255256 if ( ( process . argv . includes ( '--show-hidden' ) )
256- || 1 <= cmd_count ( ) ) // When display in submenu!
257+ || level <= cmd_count ( ) ) // When display in submenu!
257258 return description ;
258259 return false ;
259260}
You can’t perform that action at this time.
0 commit comments