bashly 1.2.8 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/bashly/cli.rb +1 -1
- data/lib/bashly/commands/add.rb +5 -2
- data/lib/bashly/docs/arg.yml +8 -8
- data/lib/bashly/docs/command.yml +23 -23
- data/lib/bashly/docs/env.yml +7 -7
- data/lib/bashly/docs/flag.yml +15 -15
- data/lib/bashly/docs/var.yml +3 -3
- data/lib/bashly/libraries/colors/colors.sh +12 -1
- data/lib/bashly/libraries/libraries.yml +8 -0
- data/lib/bashly/version.rb +1 -1
- data/lib/bashly/views/wrapper/header.gtx +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 835cd138c47f6519a1fc6ca21c5dfc4b3a9b276e8ea8d082104d7206cc1ed75e
|
4
|
+
data.tar.gz: 8688035834ceb891b28cc6b22f6f9a9a215332a674e5f900e89339862e49d993
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b01a2ece1903bafb37e2dcf8fd28797272ec99e226484e34bf8a4927aa9368cef31a6f21a89cc51b807d5ba3da53eaaf83fb0683a929a5e43de07899334e82c6
|
7
|
+
data.tar.gz: 47a1aa8c24dba99340d98f3f348b1aa24b4c2907ba6ffd37968ce6b4aa54c74dca75057397d1ba58c73934e49b63aad20a3f62b3d1e228af903fe90a8ddf6f97
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Create feature-rich bash scripts using simple YAML configuration
|
|
9
9
|
[![Build Status](https://github.com/DannyBen/bashly/workflows/Test/badge.svg)](https://github.com/DannyBen/bashly/actions?query=workflow%3ATest)
|
10
10
|
[![Maintainability](https://api.codeclimate.com/v1/badges/8cf89047e50ca601e431/maintainability)](https://codeclimate.com/github/DannyBen/bashly/maintainability)
|
11
11
|
|
12
|
-
## [bashly.
|
12
|
+
## [bashly.dev](https://bashly.dev)
|
13
13
|
|
14
14
|
---
|
15
15
|
|
@@ -76,6 +76,6 @@ Visit the *[How to contribute][contributing]* page for more information.
|
|
76
76
|
|
77
77
|
[issues]: https://github.com/DannyBen/bashly/issues
|
78
78
|
[discussions]: https://github.com/DannyBen/bashly/discussions
|
79
|
-
[docs]: https://bashly.
|
79
|
+
[docs]: https://bashly.dev/
|
80
80
|
[examples]: https://github.com/DannyBen/bashly/tree/master/examples#bashly-examples
|
81
81
|
[contributing]: https://github.com/DannyBen/bashly/blob/master/CONTRIBUTING.md#how-to-contribute
|
data/lib/bashly/cli.rb
CHANGED
@@ -7,7 +7,7 @@ module Bashly
|
|
7
7
|
def self.runner
|
8
8
|
runner = MisterBin::Runner.new version: Bashly::VERSION,
|
9
9
|
header: 'Bashly - Bash CLI Generator',
|
10
|
-
footer: "Help: m`bashly COMMAND --help`\nDocs: bu`https://bashly.
|
10
|
+
footer: "Help: m`bashly COMMAND --help`\nDocs: bu`https://bashly.dev`"
|
11
11
|
|
12
12
|
runner.route 'init', to: Commands::Init
|
13
13
|
runner.route 'preview', to: Commands::Preview
|
data/lib/bashly/commands/add.rb
CHANGED
@@ -3,7 +3,7 @@ module Bashly
|
|
3
3
|
class Add < Base
|
4
4
|
help 'Add extra features and customization to your script'
|
5
5
|
|
6
|
-
usage 'bashly add [--source NAME] LIBRARY [ARGS...] [--force]'
|
6
|
+
usage 'bashly add [--source NAME] LIBRARY [ARGS...] [--force --quiet]'
|
7
7
|
usage 'bashly add [--source NAME] --list'
|
8
8
|
usage 'bashly add (-h|--help)'
|
9
9
|
|
@@ -17,6 +17,7 @@ module Bashly
|
|
17
17
|
USAGE
|
18
18
|
option '-f --force', 'Overwrite existing files'
|
19
19
|
option '-l --list', 'Show available libraries'
|
20
|
+
option '-q --quiet', 'Do not show post-install messages'
|
20
21
|
|
21
22
|
attr_reader :skip_src_check
|
22
23
|
|
@@ -70,7 +71,9 @@ module Bashly
|
|
70
71
|
end
|
71
72
|
|
72
73
|
message = library.post_install_message
|
73
|
-
|
74
|
+
return if !message || files_created.zero? || args['--quiet']
|
75
|
+
|
76
|
+
say "\n#{message}"
|
74
77
|
end
|
75
78
|
|
76
79
|
def safe_write(path, content)
|
data/lib/bashly/docs/arg.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
arg:
|
2
2
|
help: Define positional arguments.
|
3
|
-
url: https://bashly.
|
3
|
+
url: https://bashly.dev/configuration/argument/
|
4
4
|
example: |-
|
5
5
|
args:
|
6
6
|
- name: user
|
@@ -16,7 +16,7 @@ arg:
|
|
16
16
|
|
17
17
|
arg.allowed:
|
18
18
|
help: Specify a list of allowed values. Can be used in conjunction with `default` and `required`.
|
19
|
-
url: https://bashly.
|
19
|
+
url: https://bashly.dev/configuration/argument/#allowed
|
20
20
|
example: |-
|
21
21
|
args:
|
22
22
|
- name: region
|
@@ -35,7 +35,7 @@ arg.allowed:
|
|
35
35
|
|
36
36
|
arg.default:
|
37
37
|
help: Specify the value to apply when not provided by the user.
|
38
|
-
url: https://bashly.
|
38
|
+
url: https://bashly.dev/configuration/argument/#default
|
39
39
|
example: |-
|
40
40
|
args:
|
41
41
|
- name: images
|
@@ -44,7 +44,7 @@ arg.default:
|
|
44
44
|
|
45
45
|
arg.help:
|
46
46
|
help: Specify the help message for this argument.
|
47
|
-
url: https://bashly.
|
47
|
+
url: https://bashly.dev/configuration/argument/#help
|
48
48
|
example: |-
|
49
49
|
args:
|
50
50
|
- name: user
|
@@ -53,7 +53,7 @@ arg.help:
|
|
53
53
|
|
54
54
|
arg.name:
|
55
55
|
help: Specify the lowercase name of the argument.
|
56
|
-
url: https://bashly.
|
56
|
+
url: https://bashly.dev/configuration/argument/#name
|
57
57
|
example: |-
|
58
58
|
args:
|
59
59
|
- name: user
|
@@ -67,7 +67,7 @@ arg.repeatable:
|
|
67
67
|
The argument below will be received as a space-delimited string which needs to be converted to an array with:
|
68
68
|
`eval "data=(${args[file]})"`
|
69
69
|
|
70
|
-
url: https://bashly.
|
70
|
+
url: https://bashly.dev/configuration/argument/#repeatable
|
71
71
|
example: |-
|
72
72
|
args:
|
73
73
|
- name: file
|
@@ -77,7 +77,7 @@ arg.repeatable:
|
|
77
77
|
|
78
78
|
arg.required:
|
79
79
|
help: Specify that this argument is required.
|
80
|
-
url: https://bashly.
|
80
|
+
url: https://bashly.dev/configuration/argument/#required
|
81
81
|
example: |-
|
82
82
|
args:
|
83
83
|
- name: region
|
@@ -87,7 +87,7 @@ arg.required:
|
|
87
87
|
arg.validate:
|
88
88
|
help: Apply custom validation functions.
|
89
89
|
|
90
|
-
url: https://bashly.
|
90
|
+
url: https://bashly.dev/configuration/argument/#validate
|
91
91
|
example: |-
|
92
92
|
args:
|
93
93
|
- name: path
|
data/lib/bashly/docs/command.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
command:
|
2
2
|
help: Define the root command, or any sub-command.
|
3
|
-
url: https://bashly.
|
3
|
+
url: https://bashly.dev/configuration/command/
|
4
4
|
example: |-
|
5
5
|
name: rush
|
6
6
|
help: Personal package manager
|
@@ -17,7 +17,7 @@ command:
|
|
17
17
|
|
18
18
|
command.alias:
|
19
19
|
help: Specify one or more aliases for this sub-command.
|
20
|
-
url: https://bashly.
|
20
|
+
url: https://bashly.dev/configuration/command/#alias
|
21
21
|
example: |-
|
22
22
|
# Define a single alias
|
23
23
|
command:
|
@@ -36,7 +36,7 @@ command.alias:
|
|
36
36
|
|
37
37
|
command.args:
|
38
38
|
help: Define a list of positional arguments. See `arg` for reference.
|
39
|
-
url: https://bashly.
|
39
|
+
url: https://bashly.dev/configuration/command/#args
|
40
40
|
example: |-
|
41
41
|
args:
|
42
42
|
- name: repo
|
@@ -45,7 +45,7 @@ command.args:
|
|
45
45
|
|
46
46
|
command.catch_all:
|
47
47
|
help: Specify that this command should allow for additional arbitrary arguments or flags.
|
48
|
-
url: https://bashly.
|
48
|
+
url: https://bashly.dev/configuration/command/#catch_all
|
49
49
|
example: |-
|
50
50
|
commands:
|
51
51
|
- name: download
|
@@ -67,7 +67,7 @@ command.catch_all:
|
|
67
67
|
|
68
68
|
command.commands:
|
69
69
|
help: Define a list of sub-commands. See `command` for reference.
|
70
|
-
url: https://bashly.
|
70
|
+
url: https://bashly.dev/configuration/command/#commands
|
71
71
|
example: |-
|
72
72
|
commands:
|
73
73
|
- name: add
|
@@ -76,7 +76,7 @@ command.commands:
|
|
76
76
|
|
77
77
|
command.completions:
|
78
78
|
help: Specify a list of additional completion suggestions when used in conjunction with `bashly add completions`.
|
79
|
-
url: https://bashly.
|
79
|
+
url: https://bashly.dev/configuration/command/#completions
|
80
80
|
example: |-
|
81
81
|
commands:
|
82
82
|
- name: view
|
@@ -88,7 +88,7 @@ command.completions:
|
|
88
88
|
|
89
89
|
command.default:
|
90
90
|
help: Specify that this sub-command will be executed implicitly.
|
91
|
-
url: https://bashly.
|
91
|
+
url: https://bashly.dev/configuration/command/#default
|
92
92
|
example: |-
|
93
93
|
# This command will execute when the command line is not
|
94
94
|
# recognized.
|
@@ -106,7 +106,7 @@ command.default:
|
|
106
106
|
|
107
107
|
command.dependencies:
|
108
108
|
help: Specify a list of required external commands that are needed to run this command.
|
109
|
-
url: https://bashly.
|
109
|
+
url: https://bashly.dev/configuration/command/#dependencies
|
110
110
|
example: |-
|
111
111
|
# Array syntax
|
112
112
|
dependencies:
|
@@ -128,7 +128,7 @@ command.dependencies:
|
|
128
128
|
|
129
129
|
command.environment_variables:
|
130
130
|
help: Define a list of environment variables. See `environment_variable` for reference.
|
131
|
-
url: https://bashly.
|
131
|
+
url: https://bashly.dev/configuration/command/#environment_variables
|
132
132
|
example: |-
|
133
133
|
environment_variables:
|
134
134
|
- name: config_path
|
@@ -140,7 +140,7 @@ command.environment_variables:
|
|
140
140
|
|
141
141
|
command.examples:
|
142
142
|
help: Define one or more example messages.
|
143
|
-
url: https://bashly.
|
143
|
+
url: https://bashly.dev/configuration/command/#examples
|
144
144
|
example: |-
|
145
145
|
# Use an array of examples for simple one-liners.
|
146
146
|
examples:
|
@@ -159,7 +159,7 @@ command.examples:
|
|
159
159
|
|
160
160
|
command.expose:
|
161
161
|
help: Specify that the sub-commands of this command should be visible when showing the usage of its parent.
|
162
|
-
url: https://bashly.
|
162
|
+
url: https://bashly.dev/configuration/command/#expose
|
163
163
|
example: |-
|
164
164
|
name: cli
|
165
165
|
commands:
|
@@ -190,7 +190,7 @@ command.expose:
|
|
190
190
|
|
191
191
|
command.extensible:
|
192
192
|
help: Specify that this command can be extended by external means.
|
193
|
-
url: https://bashly.
|
193
|
+
url: https://bashly.dev/configuration/command/#extensible
|
194
194
|
example: |-
|
195
195
|
name: mygit
|
196
196
|
help: Wrapper for git
|
@@ -206,7 +206,7 @@ command.extensible:
|
|
206
206
|
|
207
207
|
command.filename:
|
208
208
|
help: Specify the path (relative to src) to the partial source code file.
|
209
|
-
url: https://bashly.
|
209
|
+
url: https://bashly.dev/configuration/command/#filename
|
210
210
|
example: |-
|
211
211
|
commands:
|
212
212
|
- name: connect
|
@@ -215,7 +215,7 @@ command.filename:
|
|
215
215
|
|
216
216
|
command.filters:
|
217
217
|
help: Specify a list of custom filter functions that will prevent the command from running unless certain conditions are met.
|
218
|
-
url: https://bashly.
|
218
|
+
url: https://bashly.dev/configuration/command/#filters
|
219
219
|
example: |-
|
220
220
|
commands:
|
221
221
|
- name: container
|
@@ -235,7 +235,7 @@ command.filters:
|
|
235
235
|
|
236
236
|
command.flags:
|
237
237
|
help: Define a list of option flags. See `flag` for reference.
|
238
|
-
url: https://bashly.
|
238
|
+
url: https://bashly.dev/configuration/command/#flags
|
239
239
|
example: |-
|
240
240
|
flags:
|
241
241
|
- long: --purge
|
@@ -244,13 +244,13 @@ command.flags:
|
|
244
244
|
|
245
245
|
command.footer:
|
246
246
|
help: Specify a message to show at the bottom of the help text.
|
247
|
-
url: https://bashly.
|
247
|
+
url: https://bashly.dev/configuration/command/#footer
|
248
248
|
example: |-
|
249
249
|
footer: For further help visit https://my.docs-site.com
|
250
250
|
|
251
251
|
command.function:
|
252
252
|
help: Specify a different base function name for this command.
|
253
|
-
url: https://bashly.
|
253
|
+
url: https://bashly.dev/configuration/command/#function
|
254
254
|
example: |-
|
255
255
|
commands:
|
256
256
|
- name: container-start
|
@@ -271,7 +271,7 @@ command.function:
|
|
271
271
|
|
272
272
|
command.group:
|
273
273
|
help: Specify the group that this command belongs to.
|
274
|
-
url: https://bashly.
|
274
|
+
url: https://bashly.dev/configuration/command/#group
|
275
275
|
example: |-
|
276
276
|
command:
|
277
277
|
name: start
|
@@ -280,7 +280,7 @@ command.group:
|
|
280
280
|
|
281
281
|
command.help:
|
282
282
|
help: Specify the help text to show when displaying usage.
|
283
|
-
url: https://bashly.
|
283
|
+
url: https://bashly.dev/configuration/command/#help
|
284
284
|
example: |-
|
285
285
|
name: docker
|
286
286
|
help: Runtime for containers
|
@@ -291,7 +291,7 @@ command.help:
|
|
291
291
|
|
292
292
|
command.name:
|
293
293
|
help: Specify the name of the command. This option is required.
|
294
|
-
url: https://bashly.
|
294
|
+
url: https://bashly.dev/configuration/command/#name
|
295
295
|
example: |-
|
296
296
|
name: docker
|
297
297
|
help: Runtime for containers
|
@@ -302,7 +302,7 @@ command.name:
|
|
302
302
|
|
303
303
|
command.private:
|
304
304
|
help: Specify that this command should not be displayed in the help text.
|
305
|
-
url: https://bashly.
|
305
|
+
url: https://bashly.dev/configuration/command/#private
|
306
306
|
example: |-
|
307
307
|
commands:
|
308
308
|
- name: completions
|
@@ -311,7 +311,7 @@ command.private:
|
|
311
311
|
|
312
312
|
command.variables:
|
313
313
|
help: Define a list of global bash variables. See `variable` for reference.
|
314
|
-
url: https://bashly.
|
314
|
+
url: https://bashly.dev/configuration/command/#variables
|
315
315
|
example: |-
|
316
316
|
variables:
|
317
317
|
# Simple value
|
@@ -332,7 +332,7 @@ command.variables:
|
|
332
332
|
|
333
333
|
command.version:
|
334
334
|
help: Specify the version to show when running with `--version`.
|
335
|
-
url: https://bashly.
|
335
|
+
url: https://bashly.dev/configuration/command/#version
|
336
336
|
example: |-
|
337
337
|
name: rush
|
338
338
|
help: Personal package manager
|
data/lib/bashly/docs/env.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
environment_variable:
|
2
2
|
help: Define environment variables that will be in use in your script.
|
3
|
-
url: https://bashly.
|
3
|
+
url: https://bashly.dev/configuration/environment-variable/
|
4
4
|
example: |-
|
5
5
|
environment_variables:
|
6
6
|
- name: config_path
|
@@ -12,7 +12,7 @@ environment_variable:
|
|
12
12
|
|
13
13
|
environment_variable.default:
|
14
14
|
help: Specify the value to apply when not provided by the user.
|
15
|
-
url: https://bashly.
|
15
|
+
url: https://bashly.dev/configuration/environment-variable/#default
|
16
16
|
example: |-
|
17
17
|
environment_variables:
|
18
18
|
- name: config_path
|
@@ -21,7 +21,7 @@ environment_variable.default:
|
|
21
21
|
|
22
22
|
environment_variable.help:
|
23
23
|
help: Specify the help message for this variable.
|
24
|
-
url: https://bashly.
|
24
|
+
url: https://bashly.dev/configuration/environment-variable/#help
|
25
25
|
example: |-
|
26
26
|
environment_variables:
|
27
27
|
- name: api_key
|
@@ -29,7 +29,7 @@ environment_variable.help:
|
|
29
29
|
|
30
30
|
environment_variable.name:
|
31
31
|
help: Specify the lowercase name of the variable.
|
32
|
-
url: https://bashly.
|
32
|
+
url: https://bashly.dev/configuration/environment-variable/#name
|
33
33
|
example: |-
|
34
34
|
environment_variables:
|
35
35
|
- name: api_key
|
@@ -37,7 +37,7 @@ environment_variable.name:
|
|
37
37
|
|
38
38
|
environment_variable.private:
|
39
39
|
help: Specify that this environment variable should not be advertised in the usage text.
|
40
|
-
url: https://bashly.
|
40
|
+
url: https://bashly.dev/configuration/environment-variable/#private
|
41
41
|
example: |-
|
42
42
|
environment_variables:
|
43
43
|
- name: editor
|
@@ -47,7 +47,7 @@ environment_variable.private:
|
|
47
47
|
|
48
48
|
environment_variable.required:
|
49
49
|
help: Specify that this variable is required.
|
50
|
-
url: https://bashly.
|
50
|
+
url: https://bashly.dev/configuration/environment-variable/#required
|
51
51
|
example: |-
|
52
52
|
environment_variables:
|
53
53
|
- name: api_key
|
@@ -57,7 +57,7 @@ environment_variable.required:
|
|
57
57
|
environment_variable.validate:
|
58
58
|
help: Apply custom validation functions.
|
59
59
|
|
60
|
-
url: https://bashly.
|
60
|
+
url: https://bashly.dev/configuration/environment-variable/#validate
|
61
61
|
example: |-
|
62
62
|
environment_variables:
|
63
63
|
- name: build_dir
|
data/lib/bashly/docs/flag.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
flag:
|
2
2
|
help: Define option flags.
|
3
|
-
url: https://bashly.
|
3
|
+
url: https://bashly.dev/configuration/flag/
|
4
4
|
example: |-
|
5
5
|
flags:
|
6
6
|
- long: --ssh
|
@@ -15,7 +15,7 @@ flag:
|
|
15
15
|
|
16
16
|
flag.allowed:
|
17
17
|
help: Specify a list of allowed values. Can be used in conjunction with `default` and `required`, and must be accompanied by `arg`.
|
18
|
-
url: https://bashly.
|
18
|
+
url: https://bashly.dev/configuration/flag/#allowed
|
19
19
|
example: |-
|
20
20
|
flags:
|
21
21
|
- long: --user
|
@@ -38,7 +38,7 @@ flag.allowed:
|
|
38
38
|
|
39
39
|
flag.arg:
|
40
40
|
help: Specify the name of the argument for this flag, in case it requires any.
|
41
|
-
url: https://bashly.
|
41
|
+
url: https://bashly.dev/configuration/flag/#arg
|
42
42
|
example: |-
|
43
43
|
flags:
|
44
44
|
- long: --user
|
@@ -48,7 +48,7 @@ flag.arg:
|
|
48
48
|
|
49
49
|
flag.completions:
|
50
50
|
help: Specify a list of additional completion suggestions when used in conjunction with `bashly add completions`. Must be accompanied by `arg`.
|
51
|
-
url: https://bashly.
|
51
|
+
url: https://bashly.dev/configuration/flag/#completions
|
52
52
|
example: |-
|
53
53
|
flags:
|
54
54
|
- long: --user
|
@@ -65,7 +65,7 @@ flag.completions:
|
|
65
65
|
|
66
66
|
flag.conflicts:
|
67
67
|
help: Specify that this flag is mutually exclusive with one or more other flags. Use the long name of these conflicting flags.
|
68
|
-
url: https://bashly.
|
68
|
+
url: https://bashly.dev/configuration/flag/#conflicts
|
69
69
|
example: |-
|
70
70
|
flags:
|
71
71
|
- long: --cache
|
@@ -88,7 +88,7 @@ flag.conflicts:
|
|
88
88
|
|
89
89
|
flag.default:
|
90
90
|
help: Specify the value to apply when not provided by the user.
|
91
|
-
url: https://bashly.
|
91
|
+
url: https://bashly.dev/configuration/flag/#default
|
92
92
|
example: |-
|
93
93
|
flags:
|
94
94
|
- long: --environment
|
@@ -98,7 +98,7 @@ flag.default:
|
|
98
98
|
|
99
99
|
flag.help:
|
100
100
|
help: Specify the help message for this flag.
|
101
|
-
url: https://bashly.
|
101
|
+
url: https://bashly.dev/configuration/flag/#help
|
102
102
|
example: |-
|
103
103
|
flags:
|
104
104
|
- long: --cache
|
@@ -106,7 +106,7 @@ flag.help:
|
|
106
106
|
|
107
107
|
flag.long:
|
108
108
|
help: Specify the long form of the flag, including the -- prefix. Either `long` or `short` is required.
|
109
|
-
url: https://bashly.
|
109
|
+
url: https://bashly.dev/configuration/flag/#long
|
110
110
|
example: |-
|
111
111
|
flags:
|
112
112
|
- long: --ssh
|
@@ -115,7 +115,7 @@ flag.long:
|
|
115
115
|
|
116
116
|
flag.needs:
|
117
117
|
help: Specify that this flag needs one or more additional flags. Use the long name of these needed flags.
|
118
|
-
url: https://bashly.
|
118
|
+
url: https://bashly.dev/configuration/flag/#needs
|
119
119
|
example: |-
|
120
120
|
flags:
|
121
121
|
- long: --add
|
@@ -138,7 +138,7 @@ flag.needs:
|
|
138
138
|
|
139
139
|
flag.private:
|
140
140
|
help: Specify that this flag should not be displayed in the help text.
|
141
|
-
url: https://bashly.
|
141
|
+
url: https://bashly.dev/configuration/flag/#private
|
142
142
|
example: |-
|
143
143
|
flags:
|
144
144
|
- long: --legacy
|
@@ -151,7 +151,7 @@ flag.repeatable:
|
|
151
151
|
Specify that this flag can be provided multiple times. When used on a flag with an argument, it will be received as a space-delimited string, which needs to be converted to an array with:
|
152
152
|
`eval "data=(${args[--data]})"`
|
153
153
|
|
154
|
-
url: https://bashly.
|
154
|
+
url: https://bashly.dev/configuration/flag/#repeatable
|
155
155
|
example: |-
|
156
156
|
flags:
|
157
157
|
- long: --data
|
@@ -168,7 +168,7 @@ flag.repeatable:
|
|
168
168
|
|
169
169
|
flag.required:
|
170
170
|
help: Specify that this flag is required.
|
171
|
-
url: https://bashly.
|
171
|
+
url: https://bashly.dev/configuration/flag/#required
|
172
172
|
example: |-
|
173
173
|
args:
|
174
174
|
- long: --user
|
@@ -178,7 +178,7 @@ flag.required:
|
|
178
178
|
|
179
179
|
flag.short:
|
180
180
|
help: Specify the short form of the flag, including the - prefix. Either `long` or `short` is required.
|
181
|
-
url: https://bashly.
|
181
|
+
url: https://bashly.dev/configuration/flag/#short
|
182
182
|
example: |-
|
183
183
|
- long: --user
|
184
184
|
short: -u
|
@@ -187,7 +187,7 @@ flag.short:
|
|
187
187
|
|
188
188
|
flag.unique:
|
189
189
|
help: Specify that the arguments provided by this repeatable flag must be unique. When this is set to `true`, non-unique values will be ignored.
|
190
|
-
url: https://bashly.
|
190
|
+
url: https://bashly.dev/configuration/flag/#unique
|
191
191
|
example: |-
|
192
192
|
flags:
|
193
193
|
- long: --path
|
@@ -199,7 +199,7 @@ flag.unique:
|
|
199
199
|
flag.validate:
|
200
200
|
help: Apply custom validation functions. Must be accompanied by `arg`.
|
201
201
|
|
202
|
-
url: https://bashly.
|
202
|
+
url: https://bashly.dev/configuration/flag/#validate
|
203
203
|
example: |-
|
204
204
|
flags:
|
205
205
|
- long: --config
|
data/lib/bashly/docs/var.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
variable:
|
2
2
|
help: Define variables that will be available to your script.
|
3
|
-
url: https://bashly.
|
3
|
+
url: https://bashly.dev/configuration/variable/
|
4
4
|
example: |-
|
5
5
|
variables:
|
6
6
|
# Simple value
|
@@ -21,7 +21,7 @@ variable:
|
|
21
21
|
|
22
22
|
variable.name:
|
23
23
|
help: Specify the name of the variable.
|
24
|
-
url: https://bashly.
|
24
|
+
url: https://bashly.dev/configuration/variable/#name
|
25
25
|
example: |-
|
26
26
|
variables:
|
27
27
|
- name: output_folder
|
@@ -31,7 +31,7 @@ variable.value:
|
|
31
31
|
help: |-
|
32
32
|
Specify the value for this variable.
|
33
33
|
This can be any value type, including array and hash (associative array).
|
34
|
-
url: https://bashly.
|
34
|
+
url: https://bashly.dev/configuration/variable/#value
|
35
35
|
example: |-
|
36
36
|
variables:
|
37
37
|
# Simple value
|
@@ -10,10 +10,21 @@
|
|
10
10
|
## Color output will be disabled if `NO_COLOR` environment variable is set
|
11
11
|
## in compliance with https://no-color.org/
|
12
12
|
##
|
13
|
+
## In case you wish to enable auto detection for color output based on the
|
14
|
+
## terminal being interactive (TTY), call `enable_auto_colors` in your
|
15
|
+
## `src/initialize.sh` (Run `bashly add hooks` to add this file).
|
16
|
+
##
|
17
|
+
enable_auto_colors() {
|
18
|
+
## If NO_COLOR has not been set and stdout is not a TTY, disable colors
|
19
|
+
if [[ -z ${NO_COLOR+x} && ! -t 1 ]]; then
|
20
|
+
NO_COLOR=1
|
21
|
+
fi
|
22
|
+
}
|
23
|
+
|
13
24
|
print_in_color() {
|
14
25
|
local color="$1"
|
15
26
|
shift
|
16
|
-
if [[
|
27
|
+
if [[ "${NO_COLOR:-}" == "" ]]; then
|
17
28
|
printf "$color%b\e[0m\n" "$*"
|
18
29
|
else
|
19
30
|
printf "%b\n" "$*"
|
@@ -3,6 +3,14 @@ colors:
|
|
3
3
|
files:
|
4
4
|
- source: "colors/colors.sh"
|
5
5
|
target: "%{user_lib_dir}/colors.%{user_ext}"
|
6
|
+
post_install_message: |
|
7
|
+
The colors library supports the g`NO_COLOR` standard out of the box.
|
8
|
+
|
9
|
+
In case you wish to also enable automatic output of colors based on the
|
10
|
+
terminal being interactive (TTY), call g`enable_auto_colors` in your
|
11
|
+
g`src/initialize.sh`. You may run the following command to add this file:
|
12
|
+
|
13
|
+
m`$ bashly add hooks`
|
6
14
|
|
7
15
|
completions:
|
8
16
|
help: Generate a bash completions function.
|
data/lib/bashly/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
> #!/usr/bin/env bash
|
2
2
|
if Settings.enabled? :header_comment
|
3
|
-
> # This script was generated by bashly {{ Bashly::VERSION }} (https://bashly.
|
3
|
+
> # This script was generated by bashly {{ Bashly::VERSION }} (https://bashly.dev)
|
4
4
|
> # Modifying it manually is not recommended
|
5
5
|
end
|
6
6
|
>
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bashly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-27 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: colsole
|
@@ -345,7 +345,7 @@ licenses:
|
|
345
345
|
metadata:
|
346
346
|
bug_tracker_uri: https://github.com/DannyBen/bashly/issues
|
347
347
|
changelog_uri: https://github.com/DannyBen/bashly/blob/master/CHANGELOG.md
|
348
|
-
homepage_uri: https://bashly.
|
348
|
+
homepage_uri: https://bashly.dev/
|
349
349
|
source_code_uri: https://github.com/DannyBen/bashly
|
350
350
|
rubygems_mfa_required: 'true'
|
351
351
|
rdoc_options: []
|