Commit a4bbae9 1 parent 29c5e60 commit a4bbae9 Copy full SHA for a4bbae9
File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
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
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.
You can’t perform that action at this time.
0 commit comments