Skip to content

Commit a7fb1d6

Browse files
committed
rename string: flag_requires_another => flag_needs_another
1 parent 7697b8f commit a7fb1d6

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

lib/bashly/libraries/strings/strings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ version_flag_text: Show version number
2727

2828
# Error messages
2929
flag_requires_an_argument: "%{name} requires an argument: %{usage}"
30-
flag_requires_another: "%{name} requires %{need}"
30+
flag_needs_another: "%{name} needs %{need}"
3131
invalid_argument: "invalid argument: %s"
3232
invalid_flag: "invalid option: %s"
3333
invalid_command: "invalid command: %s"

lib/bashly/views/flag/needs.gtx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ if needs
44

55
if needs.count == 1
66
> if [[ -n ${args['{{ name }}']+x} ]] && [[ -z "${args[{{ needs.first }}]:-}" ]]; then
7-
> printf "%s\n" "{{ strings[:flag_requires_another] % { name: name, need: needs.first } }}" >&2
7+
> printf "%s\n" "{{ strings[:flag_needs_another] % { name: name, need: needs.first } }}" >&2
88
> exit 1
99
> fi
1010
>
1111
else
1212
> if [[ -n ${args['{{ name }}']+x} ]]; then
1313
> for need in {{ needs.join ' ' }}; do
1414
> if [[ -z "${args[$need]:-}" ]]; then
15-
> printf "%s\n" "{{ strings[:flag_requires_another] % { name: name, need: "$need" } }}" >&2
15+
> printf "%s\n" "{{ strings[:flag_needs_another] % { name: name, need: "$need" } }}" >&2
1616
> exit 1
1717
> fi
1818
> done

schemas/strings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,12 @@
137137
"minLength": 1,
138138
"default": "%{name} requires an argument: %{usage}"
139139
},
140-
"flag_requires_another": {
141-
"title": "flag requires another flag",
140+
"flag_needs_another": {
141+
"title": "flag needs another flag",
142142
"description": "The error message template for missing flag needs\nhttps://bashly.dannyb.co/advanced/strings/#custom-strings",
143143
"type": "string",
144144
"minLength": 1,
145-
"default": "%{name} requires %{need}"
145+
"default": "%{name} needs %{need}"
146146
},
147147
"invalid_argument": {
148148
"title": "invalid argument",

0 commit comments

Comments
 (0)