|
17 | 17 | - [File Copying](#file-copying) |
18 | 18 | - [Directory Copying](#directory-copying) |
19 | 19 | - [Hooks](#hooks) |
| 20 | +- [UI Settings](#ui-settings) |
20 | 21 | - [Shell Completions](#shell-completions) |
21 | 22 | - [Configuration Examples](#configuration-examples) |
22 | 23 | - [Environment Variables](#environment-variables) |
@@ -337,6 +338,28 @@ git gtr config add gtr.hook.postCreate "cargo build" |
337 | 338 |
|
338 | 339 | --- |
339 | 340 |
|
| 341 | +## UI Settings |
| 342 | + |
| 343 | +Control color output behavior. |
| 344 | + |
| 345 | +| Git Config Key | `.gtrconfig` Key | Description | Values | |
| 346 | +| -------------- | ---------------- | ----------------- | ----------------------------------- | |
| 347 | +| `gtr.ui.color` | `ui.color` | Color output mode | `auto` (default), `always`, `never` | |
| 348 | + |
| 349 | +```bash |
| 350 | +# Disable color output |
| 351 | +git gtr config set gtr.ui.color never |
| 352 | + |
| 353 | +# Force color output (e.g., when piping to a pager) |
| 354 | +git gtr config set gtr.ui.color always |
| 355 | +``` |
| 356 | + |
| 357 | +**Precedence**: `NO_COLOR` env (highest) > `GTR_COLOR` env > `gtr.ui.color` config > auto-detect (TTY). |
| 358 | + |
| 359 | +The `NO_COLOR` environment variable ([no-color.org](https://no-color.org)) always wins regardless of other settings. |
| 360 | + |
| 361 | +--- |
| 362 | + |
340 | 363 | ## Shell Completions |
341 | 364 |
|
342 | 365 | Enable tab completion using the built-in `completion` command. |
@@ -420,15 +443,17 @@ git gtr config set gtr.ai.default claude --global |
420 | 443 |
|
421 | 444 | ## Environment Variables |
422 | 445 |
|
423 | | -| Variable | Description | Default | |
424 | | -| --------------------- | ------------------------------------------------------ | -------------------------- | |
425 | | -| `GTR_DIR` | Override script directory location | Auto-detected | |
426 | | -| `GTR_WORKTREES_DIR` | Override base worktrees directory | `gtr.worktrees.dir` config | |
427 | | -| `GTR_EDITOR_CMD` | Custom editor command (e.g., `emacs`) | None | |
428 | | -| `GTR_EDITOR_CMD_NAME` | First word of `GTR_EDITOR_CMD` for availability checks | None | |
429 | | -| `GTR_AI_CMD` | Custom AI tool command (e.g., `copilot`) | None | |
430 | | -| `GTR_AI_CMD_NAME` | First word of `GTR_AI_CMD` for availability checks | None | |
431 | | -| `GTR_PROVIDER` | Override hosting provider (`github` or `gitlab`) | Auto-detected from URL | |
| 446 | +| Variable | Description | Default | |
| 447 | +| --------------------- | -------------------------------------------------------------------- | -------------------------- | |
| 448 | +| `GTR_DIR` | Override script directory location | Auto-detected | |
| 449 | +| `GTR_WORKTREES_DIR` | Override base worktrees directory | `gtr.worktrees.dir` config | |
| 450 | +| `GTR_EDITOR_CMD` | Custom editor command (e.g., `emacs`) | None | |
| 451 | +| `GTR_EDITOR_CMD_NAME` | First word of `GTR_EDITOR_CMD` for availability checks | None | |
| 452 | +| `GTR_AI_CMD` | Custom AI tool command (e.g., `copilot`) | None | |
| 453 | +| `GTR_AI_CMD_NAME` | First word of `GTR_AI_CMD` for availability checks | None | |
| 454 | +| `GTR_COLOR` | Override color output (`always`, `never`, `auto`) | `auto` | |
| 455 | +| `GTR_PROVIDER` | Override hosting provider (`github` or `gitlab`) | Auto-detected from URL | |
| 456 | +| `NO_COLOR` | Disable color output when set ([no-color.org](https://no-color.org)) | Unset | |
432 | 457 |
|
433 | 458 | **Hook environment variables** (available in hook scripts): |
434 | 459 |
|
|
0 commit comments