Skip to content

Commit f9b88b5

Browse files
committed
add private_reveal_key
1 parent 8649b63 commit f9b88b5

File tree

4 files changed

+64
-0
lines changed

4 files changed

+64
-0
lines changed

src/configuration/command.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,9 @@ as a "last resort" mechanism to help in solving more complex scenarios.
345345

346346
Setting this to `true` on any command, will hide it from the command list.
347347

348+
!!!success Tip
349+
To allow users to see private commands, see
350+
[Settings :icon-chevron-right: private_reveal_key](/usage/settings/#private_reveal_key)
351+
!!!
352+
348353
[!button variant="primary" icon="code-review" text="Private Command Example"](https://github.com/DannyBen/bashly/tree/master/examples/command-private#readme)

src/configuration/environment-variable.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ environment variable is optional.
7171
Setting this to `true` on any environment variable, will hide it from the help
7272
text.
7373

74+
!!!success Tip
75+
To allow users to see private environment variables, see
76+
[Settings :icon-chevron-right: private_reveal_key](/usage/settings/#private_reveal_key)
77+
!!!
78+
7479
### required
7580

7681
[!badge Boolean]

src/configuration/flag.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,11 @@ This option should be specified on both sides of the requirement.
185185

186186
Setting this to `true` on any flag, will hide it from the help text.
187187

188+
!!!success Tip
189+
To allow users to see private flags, see
190+
[Settings :icon-chevron-right: private_reveal_key](/usage/settings/#private_reveal_key)
191+
!!!
192+
188193
### repeatable
189194

190195
[!badge Boolean]

src/usage/settings.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ When setting environment variables, you can use:
4848
### `source_dir`
4949

5050
```yaml
51+
# default
5152
source_dir: src
5253
```
5354
@@ -56,6 +57,7 @@ Set the path containing the bashly source files.
5657
### `config_path`
5758

5859
```yaml
60+
# default
5961
config_path: "%{source_dir}/bashly.yml"
6062
```
6163

@@ -65,6 +67,7 @@ reference the value of the `source_dir` option.
6567
### `target_dir`
6668

6769
```yaml
70+
# default
6871
target_dir: .
6972
```
7073

@@ -73,6 +76,7 @@ Set the path to use for creating the final bash script.
7376
### `lib_dir`
7477

7578
```yaml
79+
# default
7680
lib_dir: lib
7781
```
7882

@@ -81,7 +85,11 @@ Set the path to use for common library files, relative to `source_dir`.
8185
### `commands_dir`
8286

8387
```yaml
88+
# default
8489
commands_dir: ~
90+
91+
# example
92+
commands_dir: commands
8593
```
8694

8795
Set the path to use for command files, relative to `source_dir`.
@@ -99,7 +107,13 @@ recommended to enable this by setting it to something like
99107
### `strict`
100108

101109
```yaml
110+
# default
102111
strict: false
112+
113+
# examples
114+
strict: true
115+
strict: ''
116+
strict: set -o pipefail
103117
```
104118

105119
Specify which bash options to apply on initialization.
@@ -113,6 +127,7 @@ Specify which bash options to apply on initialization.
113127
### `tab_indent`
114128

115129
```yaml
130+
# default
116131
tab_indent: false
117132
```
118133

@@ -125,6 +140,7 @@ Specify the indentation style of the generated script.
125140
### `compact_short_flags`
126141

127142
```yaml
143+
# default
128144
compact_short_flags: true
129145
```
130146

@@ -136,6 +152,7 @@ Specify how the generated script should treat flags in the form of `-abc`
136152
### `conjoined_flag_args`
137153

138154
```yaml
155+
# default
139156
conjoined_flag_args: true
140157
```
141158

@@ -148,6 +165,7 @@ or `-f=value`
148165
### `env`
149166

150167
```yaml
168+
# default
151169
env: development
152170
```
153171

@@ -166,7 +184,11 @@ user's partial code files.
166184
### `partials_extension`
167185

168186
```yaml
187+
# default
169188
partials_extension: sh
189+
190+
# example
191+
partials_extension: bash
170192
```
171193

172194
Set the extension to use when reading/writing partial script snippets.
@@ -175,6 +197,7 @@ Set the extension to use when reading/writing partial script snippets.
175197
### `show_examples_on_error`
176198

177199
```yaml
200+
# default
178201
show_examples_on_error: false
179202
```
180203

@@ -185,15 +208,41 @@ provide the required arguments.
185208
[!button variant="primary" icon="code-review" text="Show Examples on Error Example"](https://github.com/DannyBen/bashly/tree/master/examples/command-examples-on-error#readme)
186209

187210

211+
### `private_reveal_key`
212+
213+
```yaml
214+
# default
215+
private_reveal_key: ~
216+
217+
# example
218+
private_reveal_key: ADVANCED_FEATURES
219+
```
220+
221+
When using private commands, flags, or environment variables, you may set
222+
this option to a name of an environment variable that, if set, will reveal
223+
all the private elements in the usage texts, as if they were public.
224+
225+
[!button variant="primary" icon="code-review" text="Private Reveal Example"](https://github.com/DannyBen/bashly/tree/master/examples/private-reveal#readme)
226+
227+
188228
### `usage_colors`
189229

190230
```yaml
231+
# default
191232
usage_colors:
192233
caption: ~
193234
command: ~
194235
arg: ~
195236
flag: ~
196237
environment_variable: ~
238+
239+
# example
240+
usage_colors:
241+
caption: bold
242+
command: green_underlined
243+
arg: blue
244+
flag: magenta
245+
environment_variable: cyan_bold
197246
```
198247

199248
Enable color output for several aspects of the help message of the generated

0 commit comments

Comments
 (0)