-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* customize mode conflicts: improve help messages * Enablze overriding input fields with --override * Fix unescaped [ in rustdoc
- Loading branch information
Showing
10 changed files
with
193 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# capture = 'stdout' | ||
# command = ['export', '--', '--help'] | ||
{ | ||
help | String, | ||
input | Number, | ||
|
||
output = if input == 0 then help else "", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# capture = 'stdout' | ||
# command = ['export', '--', '--help'] | ||
{ | ||
override | String, | ||
input | Number, | ||
|
||
output = if input == 0 then override else "", | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions
28
cli/tests/snapshot/snapshots/snapshot__export_stdout_has_help.ncl.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
source: cli/tests/snapshot/main.rs | ||
expression: out | ||
--- | ||
Customize a Nickel configuration through the command line before exporting | ||
|
||
Usage: customize-mode [OPTIONS] --input <Number> | ||
|
||
Options: | ||
--input <Number> | ||
|
||
|
||
--override <field> <value> | ||
Override any field of the configuration with a valid Nickel expression provided as a | ||
string. The new value will be merged with the configuration with a `force` priority. | ||
|
||
Overridable fields: | ||
- output | ||
|
||
-h, --help | ||
Print help (see a summary with '-h') | ||
|
||
[CONFLICT] This configuration has a field named `help` which conflicts with the built-in `--help` | ||
argument. To set this field to e.g. "some_value", use `--override help "some_value"` instead of | ||
`--help "some_value"` | ||
|
||
[WARNING] Customize mode is experimental. Its interface is subject to breaking changes. | ||
|
28 changes: 28 additions & 0 deletions
28
cli/tests/snapshot/snapshots/snapshot__export_stdout_has_override.ncl.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
source: cli/tests/snapshot/main.rs | ||
expression: out | ||
--- | ||
Customize a Nickel configuration through the command line before exporting | ||
|
||
Usage: customize-mode [OPTIONS] --input <Number> | ||
|
||
Options: | ||
--input <Number> | ||
|
||
|
||
--override <field> <value> | ||
Override any field of the configuration with a valid Nickel expression provided as a | ||
string. The new value will be merged with the configuration with a `force` priority. | ||
|
||
Overridable fields: | ||
- output | ||
|
||
-h, --help | ||
Print help (see a summary with '-h') | ||
|
||
[CONFLICT] This configuration has a field named `override` which conflicts with the built-in | ||
`--override` argument. To set this field to e.g. "some_value", use `--override override | ||
"some_value"` instead of `--override "some_value"` | ||
|
||
[WARNING] Customize mode is experimental. Its interface is subject to breaking changes. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters