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 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+ # # 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+
1324print_in_color () {
1425 local color=" $1 "
1526 shift
16- if [[ -z ${NO_COLOR+x} ]]; then
27+ if [[ " ${NO_COLOR:- } " == " " ]]; then
1728 printf " $color %b\e[0m\n" " $* "
1829 else
1930 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+ # # 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+
1324print_in_color () {
1425 local color=" $1 "
1526 shift
16- if [[ -z ${NO_COLOR+x} ]]; then
27+ if [[ " ${NO_COLOR:- } " == " " ]]; then
1728 printf " $color %b\e[0m\n" " $* "
1829 else
1930 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+ # # 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+
1324print_in_color () {
1425 local color=" $1 "
1526 shift
16- if [[ -z ${NO_COLOR+x} ]]; then
27+ if [[ " ${NO_COLOR:- } " == " " ]]; then
1728 printf " $color %b\e[0m\n" " $* "
1829 else
1930 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 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+ # # 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+
1324print_in_color () {
1425 local color=" $1 "
1526 shift
Original file line number Diff line number Diff line change 33 files :
44 - source : " colors/colors.sh"
55 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`
614
715completions :
816 help : Generate a bash completions function.
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
You can’t perform that action at this time.
0 commit comments