File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
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
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.
You can’t perform that action at this time.
0 commit comments