File tree Expand file tree Collapse file tree 15 files changed +114
-6
lines changed Expand file tree Collapse file tree 15 files changed +114
-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
+ # # 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 [[ -z ${NO_COLOR+x} ]]; then
27
+ if [[ " ${NO_COLOR:- } " == " " ]]; then
17
28
printf " $color %b\e[0m\n" " $* "
18
29
else
19
30
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
+ # # 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 [[ -z ${NO_COLOR+x} ]]; then
27
+ if [[ " ${NO_COLOR:- } " == " " ]]; then
17
28
printf " $color %b\e[0m\n" " $* "
18
29
else
19
30
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
+ # # 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 [[ -z ${NO_COLOR+x} ]]; then
27
+ if [[ " ${NO_COLOR:- } " == " " ]]; then
17
28
printf " $color %b\e[0m\n" " $* "
18
29
else
19
30
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 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
Original file line number Diff line number Diff line change 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.
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
You can’t perform that action at this time.
0 commit comments