Commit efb5ad8 1 parent a4bbae9 commit efb5ad8 Copy full SHA for efb5ad8
File tree 13 files changed +86
-6
lines changed
13 files changed +86
-6
lines changed Original file line number Diff line number Diff line change 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
+ [[ -z ${NO_COLOR+x} && ! -t 1 ]] && NO_COLOR=1 || true
19
+ }
20
+
13
21
print_in_color () {
14
22
local color=" $1 "
15
23
shift
16
- if [[ -z ${NO_COLOR+x} ]]; then
24
+ if [[ " ${NO_COLOR:- } " == " " ]]; then
17
25
printf " $color %b\e[0m\n" " $* "
18
26
else
19
27
printf " %b\n" " $* "
Original file line number Diff line number Diff line change 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
+ [[ -z ${NO_COLOR+x} && ! -t 1 ]] && NO_COLOR=1 || true
19
+ }
20
+
13
21
print_in_color () {
14
22
local color=" $1 "
15
23
shift
16
- if [[ -z ${NO_COLOR+x} ]]; then
24
+ if [[ " ${NO_COLOR:- } " == " " ]]; then
17
25
printf " $color %b\e[0m\n" " $* "
18
26
else
19
27
printf " %b\n" " $* "
Original file line number Diff line number Diff line change 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
+ [[ -z ${NO_COLOR+x} && ! -t 1 ]] && NO_COLOR=1 || true
19
+ }
20
+
13
21
print_in_color () {
14
22
local color=" $1 "
15
23
shift
16
- if [[ -z ${NO_COLOR+x} ]]; then
24
+ if [[ " ${NO_COLOR:- } " == " " ]]; then
17
25
printf " $color %b\e[0m\n" " $* "
18
26
else
19
27
printf " %b\n" " $* "
Original file line number Diff line number Diff line change 1
1
.\" Automatically generated by Pandoc 3.2
2
2
.\"
3
- .TH "download" "1" "December 2024 " "Version 0.1.0" "Sample application"
3
+ .TH "download" "1" "January 2025 " "Version 0.1.0" "Sample application"
4
4
.SH NAME
5
5
\f[B] download \f[ R ] \- Sample application
6
6
.SH SYNOPSIS
Original file line number Diff line number Diff line change 1
1
% download(1) Version 0.1.0 | Sample application
2
2
% Lana Lang
3
- % December 2024
3
+ % January 2025
4
4
5
5
NAME
6
6
==================================================
Original file line number Diff line number Diff line change 1
1
created spec/tmp/src/lib/colors.sh
2
+
3
+ The colors library supports the NO_COLOR standard out of the box.
4
+
5
+ In case you wish to also enable automatic output of colors based on the
6
+ terminal being interactive (TTY), call enable_auto_colors in your
7
+ src/initialize.sh. You may run the following command to add this file:
8
+
9
+ $ bashly add hooks
10
+
Original file line number Diff line number Diff line change 1
1
+ bashly add colors --force
2
2
created src/lib/colors.sh
3
+
4
+ The colors library supports the NO_COLOR standard out of the box.
5
+
6
+ In case you wish to also enable automatic output of colors based on the
7
+ terminal being interactive (TTY), call enable_auto_colors in your
8
+ src/initialize.sh. You may run the following command to add this file:
9
+
10
+ $ bashly add hooks
11
+
3
12
+ bashly generate
4
13
creating user files in src
5
14
skipped src/root_command.sh (exists)
Original file line number Diff line number Diff line change 1
1
+ bashly add colors
2
2
created src/lib/colors.sh
3
+
4
+ The colors library supports the NO_COLOR standard out of the box.
5
+
6
+ In case you wish to also enable automatic output of colors based on the
7
+ terminal being interactive (TTY), call enable_auto_colors in your
8
+ src/initialize.sh. You may run the following command to add this file:
9
+
10
+ $ bashly add hooks
11
+
3
12
+ bashly generate
4
13
creating user files in src
5
14
created src/download_command.sh
Original file line number Diff line number Diff line change 1
1
+ bashly add colors
2
2
created src/lib/colors.sh
3
+
4
+ The colors library supports the NO_COLOR standard out of the box.
5
+
6
+ In case you wish to also enable automatic output of colors based on the
7
+ terminal being interactive (TTY), call enable_auto_colors in your
8
+ src/initialize.sh. You may run the following command to add this file:
9
+
10
+ $ bashly add hooks
11
+
3
12
+ bashly generate
4
13
creating user files in src
5
14
created src/download_command.sh
Original file line number Diff line number Diff line change @@ -44,4 +44,4 @@ ISSUE TRACKER
44
44
AUTHORS
45
45
Lana Lang.
46
46
47
- Version 0.1.0 December 2024 download(1)
47
+ Version 0.1.0 January 2025 download(1)
Original file line number Diff line number Diff line change @@ -7,6 +7,15 @@ run ./cli --help to test your bash script
7
7
created src/my-libz/sample_function.sh
8
8
+ bundle exec bashly add colors
9
9
created src/my-libz/colors.sh
10
+
11
+ The colors library supports the NO_COLOR standard out of the box.
12
+
13
+ In case you wish to also enable automatic output of colors based on the
14
+ terminal being interactive (TTY), call enable_auto_colors in your
15
+ src/initialize.sh. You may run the following command to add this file:
16
+
17
+ $ bashly add hooks
18
+
10
19
+ bundle exec bashly generate
11
20
creating user files in src
12
21
skipped src/root_command.sh (exists)
Original file line number Diff line number Diff line change @@ -11,6 +11,15 @@ created ./cli
11
11
run ./cli --help to test your bash script
12
12
+ bundle exec bashly add colors
13
13
created src/lib/colors.bash
14
+
15
+ The colors library supports the NO_COLOR standard out of the box.
16
+
17
+ In case you wish to also enable automatic output of colors based on the
18
+ terminal being interactive (TTY), call enable_auto_colors in your
19
+ src/initialize.sh. You may run the following command to add this file:
20
+
21
+ $ bashly add hooks
22
+
14
23
+ bundle exec bashly add completions
15
24
created src/lib/send_completions.bash
16
25
Original file line number Diff line number Diff line change 32
32
33
33
describe '#post_install_message' do
34
34
context 'when the library has no configured message' do
35
+ let ( :name ) { :config }
36
+
35
37
it 'returns nil' do
36
38
expect ( subject . post_install_message ) . to be_nil
37
39
end
You can’t perform that action at this time.
0 commit comments