File tree Expand file tree Collapse file tree 13 files changed +86
-6
lines changed Expand file tree Collapse file tree 13 files changed +86
-6
lines changed Original file line number Diff line number Diff line change 1010# # Color output will be disabled if `NO_COLOR` environment variable is set
1111# # in compliance with https://no-color.org/
1212# #
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+
1321print_in_color () {
1422 local color=" $1 "
1523 shift
16- if [[ -z ${NO_COLOR+x} ]]; then
24+ if [[ " ${NO_COLOR:- } " == " " ]]; then
1725 printf " $color %b\e[0m\n" " $* "
1826 else
1927 printf " %b\n" " $* "
Original file line number Diff line number Diff line change 1010# # Color output will be disabled if `NO_COLOR` environment variable is set
1111# # in compliance with https://no-color.org/
1212# #
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+
1321print_in_color () {
1422 local color=" $1 "
1523 shift
16- if [[ -z ${NO_COLOR+x} ]]; then
24+ if [[ " ${NO_COLOR:- } " == " " ]]; then
1725 printf " $color %b\e[0m\n" " $* "
1826 else
1927 printf " %b\n" " $* "
Original file line number Diff line number Diff line change 1010# # Color output will be disabled if `NO_COLOR` environment variable is set
1111# # in compliance with https://no-color.org/
1212# #
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+
1321print_in_color () {
1422 local color=" $1 "
1523 shift
16- if [[ -z ${NO_COLOR+x} ]]; then
24+ if [[ " ${NO_COLOR:- } " == " " ]]; then
1725 printf " $color %b\e[0m\n" " $* "
1826 else
1927 printf " %b\n" " $* "
Original file line number Diff line number Diff line change 11.\" Automatically generated by Pandoc 3.2
22.\"
3- .TH "download" "1" "December 2024 " "Version 0.1.0" "Sample application"
3+ .TH "download" "1" "January 2025 " "Version 0.1.0" "Sample application"
44.SH NAME
55\f[B] download \f[ R ] \- Sample application
66.SH SYNOPSIS
Original file line number Diff line number Diff line change 11% download(1) Version 0.1.0 | Sample application
22% Lana Lang
3- % December 2024
3+ % January 2025
44
55NAME
66==================================================
Original file line number Diff line number Diff line change 11created 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 11+ bashly add colors --force
22created 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+
312+ bashly generate
413creating user files in src
514skipped src/root_command.sh (exists)
Original file line number Diff line number Diff line change 11+ bashly add colors
22created 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+
312+ bashly generate
413creating user files in src
514created src/download_command.sh
Original file line number Diff line number Diff line change 11+ bashly add colors
22created 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+
312+ bashly generate
413creating user files in src
514created src/download_command.sh
Original file line number Diff line number Diff line change @@ -44,4 +44,4 @@ ISSUE TRACKER
4444AUTHORS
4545 Lana Lang.
4646
47- Version 0.1.0 December 2024 download(1)
47+ Version 0.1.0 January 2025 download(1)
You can’t perform that action at this time.
0 commit comments