You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -576,6 +576,11 @@ Describe a `key` for the generated usage information.
576
576
577
577
Optionally `.describe()` can take an object that maps keys to descriptions.
578
578
579
+
<aname="hide"></a>.hide(key)
580
+
--------------------
581
+
582
+
Hides a `key` from the generated usage information. Unless a `--show-hidden` option is also passed with `--help` (see [`showHidden()`](#showHidden)).
583
+
579
584
.detectLocale(boolean)
580
585
-----------
581
586
@@ -798,6 +803,29 @@ var yargs = require("yargs")(['--info'])
798
803
.argv
799
804
```
800
805
806
+
<aname="showHidden"></a>.showHidden()
807
+
-----------------------------------------
808
+
.showHidden([option | boolean])
809
+
-----------------------------------------
810
+
.showHidden([option, [description]])
811
+
-----------------------------------------
812
+
813
+
Configure the `--show-hidden` option that displays the hidden keys (see [`hide()`](#hide)).
814
+
815
+
If the first argument is a boolean, it enables/disables this option altogether. I.e. hidden keys will be permanently hidden if first argument is `false`.
816
+
817
+
If the first argument is a string it changes the key name ("--show-hidden").
818
+
819
+
Second argument changes the default description ("Show hidden options")
0 commit comments