Skip to content

Commit

Permalink
Readme help, force color output
Browse files Browse the repository at this point in the history
If you use a custom build script and sub-programms don't output color, it could be that they assume the output has no colors. `CLICOLOR_FORCE=1` as environment variable helps.
  • Loading branch information
mickare authored Aug 28, 2016
1 parent 3e49dc6 commit 6e94770
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,36 @@ Likewise, if you would like to display ANSI colors in your existing [build-comma
}
```

If you use a custom build script and sub-programms don't output color, it could be that they assume the output has no colors. On Linux some applications can be forced to use colors by setting the environment variable `CLICOLOR_FORCE=1`. It is not recommended to set it permanently since it could cause issues if color is not supported and applications still output color. But in a SublimeANSI build you can use it for the usage in a Makefile build script, e.g.:

```javascript
// someproject.sublime-project
{
"build_systems":
[
{
/* your existing build command arguments */
"name": "Build",
"working_dir": "${project_path}",
"env": {"CLICOLOR_FORCE": "1"},
"cmd": ["sh", "build.sh"],

/* add target and syntax */
"target": "ansi_color_build",
"syntax": "Packages/ANSIescape/ANSI.tmLanguage"

"variants":
[
{
"name": "Clean",
"cmd": ["sh", "build.sh", "clean"]
}
]
}
]
}
```


#### Killing the build process

Expand Down

0 comments on commit 6e94770

Please sign in to comment.