Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn Colors on and off, select wether to use -e #18

Closed
wants to merge 4 commits into from

Conversation

niklasfi
Copy link

As you noted in #12 (comment): "maybe we just need some kind of option or env var to omit colors". Here is the way to do just that. One sets the output mode in the config file (which may be moved away from the bin directory) by changing the $colors variable to either of "colors" (normal color output), "colors+" (color output with -e) or "nocolors" (no colors shown). I hope you don't find to many flaws.

Sidenotes:

  • Setting $BLACK = $RED = $GREEN = $SPECIAL = "" in the nocolors case is not mandatory. But I realized this too late so I left it in.
  • The -e setting may have been done more elegantly with an alias. But again... I realized it this mornig... yesterday must have been late.

@@ -0,0 +1,3 @@
colors="colors+"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why a separate file? why not just have an env variable, N_COLORS=0 or N_NO_COLORS=1 etc

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there might even be a generic convention for this, I'm not sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants