Skip to content

Commit 44df91c

Browse files
committed
- Remove environment variables from all --help messages
1 parent c486cf4 commit 44df91c

File tree

10 files changed

+7
-74
lines changed

10 files changed

+7
-74
lines changed

lib/bashly/commands/add.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ class Add < Base
5353
example 'bashly add comp function'
5454
example 'bashly add comp script completions.bash'
5555

56-
environment 'BASHLY_SOURCE_DIR', 'The path containing the bashly configuration and source files [default: src]'
57-
environment 'BASHLY_LIB_DIR', 'The path to use for creating the library files, relative to the source dir ' \
58-
'[default: lib]'
59-
6056
attr_reader :skip_src_check
6157

6258
def colors_command

lib/bashly/commands/generate.rb

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,11 @@ class Generate < Base
1313
option '-u --upgrade', 'Upgrade all added library functions'
1414
option '-w --watch', 'Watch the source directory for changes and regenerate on change'
1515
option '-r --wrap FUNCTION', 'Wrap the entire script in a function so it can also be sourced'
16-
option '-e --env ENV', 'Force the generation environment (see BASHLY_ENV)'
17-
18-
environment 'BASHLY_SOURCE_DIR', 'The path containing the bashly configuration and source ' \
19-
'files [default: src]'
20-
21-
environment 'BASHLY_TARGET_DIR', 'The path to use for creating the bash script [default: .]'
22-
environment 'BASHLY_LIB_DIR',
23-
'The path to use for upgrading library files, relative to the source dir [default: lib]'
24-
25-
environment 'BASHLY_STRICT', 'When not empty, enable bash strict mode (set -euo pipefail)'
26-
environment 'BASHLY_TAB_INDENT',
27-
'When not empty, the generated script will use tab indentation instead of spaces ' \
28-
'(every 2 leading spaces will be converted to a tab character)'
29-
30-
environment 'BASHLY_ENV', <<~HELP
31-
Set to 'production' or 'development':
16+
option '-e --env ENV', <<~HELP
17+
Force the generation environment:
18+
3219
- production generate a smaller script, without file markers
3320
- development generate with file markers
34-
35-
Can be overridden with --env [default: development]
3621
HELP
3722

3823
example 'bashly generate --force'

lib/bashly/commands/init.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ class Init < Base
99

1010
option '-m --minimal', 'Use a minimal configuration file (without commands)'
1111

12-
environment 'BASHLY_SOURCE_DIR', 'The path to use for creating the configuration file [default: src]'
13-
1412
def run
1513
if Dir.exist?(target_dir) && !Dir.empty?(target_dir)
1614
raise InitError, "Directory g`#{target_dir}` already exists and is not empty"

lib/bashly/commands/preview.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ class Preview < Base
66
usage 'bashly preview'
77
usage 'bashly preview (-h|--help)'
88

9-
environment 'BASHLY_SOURCE_DIR', 'The path containing the bashly configuration and source files [default: src]'
10-
119
def run
1210
with_valid_config do
1311
command = Script::Command.new config

lib/bashly/commands/validate.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ class Validate < Base
1111
option '-v --verbose', 'Show the bashly configuration file prior to validating. ' \
1212
'This is useful when using split config (import) since it will show the final compiled configuration.'
1313

14-
environment 'BASHLY_SOURCE_DIR', 'The path containing the bashly configuration and source files [default: src]'
15-
1614
def run
1715
if args['--verbose']
1816
lp config

spec/approvals/cli/add/help

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ Parameters:
7070
For the 'comp script' or 'comp yaml' commands: path to output file.
7171
In all cases, this is optional and will have sensible defaults.
7272

73-
Environment Variables:
74-
BASHLY_SOURCE_DIR
75-
The path containing the bashly configuration and source files [default: src]
76-
77-
BASHLY_LIB_DIR
78-
The path to use for creating the library files, relative to the source dir
79-
[default: lib]
80-
8173
Examples:
8274
bashly add strings --force
8375
bashly add comp function

spec/approvals/cli/generate/help

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,14 @@ Options:
2121
Wrap the entire script in a function so it can also be sourced
2222

2323
-e --env ENV
24-
Force the generation environment (see BASHLY_ENV)
24+
Force the generation environment:
25+
26+
- production generate a smaller script, without file markers
27+
- development generate with file markers
2528

2629
-h --help
2730
Show this help
2831

29-
Environment Variables:
30-
BASHLY_SOURCE_DIR
31-
The path containing the bashly configuration and source files [default: src]
32-
33-
BASHLY_TARGET_DIR
34-
The path to use for creating the bash script [default: .]
35-
36-
BASHLY_LIB_DIR
37-
The path to use for upgrading library files, relative to the source dir
38-
[default: lib]
39-
40-
BASHLY_STRICT
41-
When not empty, enable bash strict mode (set -euo pipefail)
42-
43-
BASHLY_TAB_INDENT
44-
When not empty, the generated script will use tab indentation instead of
45-
spaces (every 2 leading spaces will be converted to a tab character)
46-
47-
BASHLY_ENV
48-
Set to 'production' or 'development':
49-
- production generate a smaller script, without file markers
50-
- development generate with file markers
51-
52-
Can be overridden with --env [default: development]
53-
5432
Examples:
5533
bashly generate --force
5634
bashly generate --wrap my_function

spec/approvals/cli/init/help

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,3 @@ Options:
1313

1414
-h --help
1515
Show this help
16-
17-
Environment Variables:
18-
BASHLY_SOURCE_DIR
19-
The path to use for creating the configuration file [default: src]

spec/approvals/cli/preview/help

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,3 @@ Usage:
77
Options:
88
-h --help
99
Show this help
10-
11-
Environment Variables:
12-
BASHLY_SOURCE_DIR
13-
The path containing the bashly configuration and source files [default: src]

spec/approvals/cli/validate/help

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,3 @@ Options:
1212

1313
-h --help
1414
Show this help
15-
16-
Environment Variables:
17-
BASHLY_SOURCE_DIR
18-
The path containing the bashly configuration and source files [default: src]

0 commit comments

Comments
 (0)