File tree Expand file tree Collapse file tree 4 files changed +16
-4
lines changed
lib/bashly/libraries/colors Expand file tree Collapse file tree 4 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1515# # `src/initialize.sh` (Run `bashly add hooks` to add this file).
1616# #
1717enable_auto_colors () {
18- [[ -z ${NO_COLOR+x} && ! -t 1 ]] && NO_COLOR=1 || true
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
1922}
2023
2124print_in_color () {
Original file line number Diff line number Diff line change 1515# # `src/initialize.sh` (Run `bashly add hooks` to add this file).
1616# #
1717enable_auto_colors () {
18- [[ -z ${NO_COLOR+x} && ! -t 1 ]] && NO_COLOR=1 || true
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
1922}
2023
2124print_in_color () {
Original file line number Diff line number Diff line change 1515# # `src/initialize.sh` (Run `bashly add hooks` to add this file).
1616# #
1717enable_auto_colors () {
18- [[ -z ${NO_COLOR+x} && ! -t 1 ]] && NO_COLOR=1 || true
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
1922}
2023
2124print_in_color () {
Original file line number Diff line number Diff line change 1515# # `src/initialize.sh` (Run `bashly add hooks` to add this file).
1616# #
1717enable_auto_colors () {
18- [[ -z ${NO_COLOR+x} && ! -t 1 ]] && NO_COLOR=1 || true
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
1922}
2023
2124print_in_color () {
You can’t perform that action at this time.
0 commit comments