Skip to content

Commit c13c56c

Browse files
committed
Readme - update info on getting colour from git within exec
1 parent 00a79e0 commit c13c56c

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,18 @@ gitopolis exec -- git pull
105105
gitopolis exec -- git status
106106
```
107107

108-
**Note:** Commands executed with `exec` run in a non-interactive (non-TTY) environment to prevent hanging on prompts or pagers. This means:
109-
- Git commands won't pause for pagers (like `less` for `git log`)
110-
- Git will default to no-color output, but you can re-enable it with `--color` (e.g., `gitopolis exec -- git log --color`)
108+
#### Interactive commands, pagers & colour
109+
110+
Commands executed with `gitopolis exec` and `gitopolis clone` run in a "non-interactive" (non-TTY) environment to prevent hanging on prompts or pagers.
111+
112+
This means:
113+
111114
- Commands won't prompt for interactive input
112-
- SSH/GPG keys must already be loaded and unlocked in ssh-agent or similar
113-
- Remote SSH host keys must already be accepted (in `~/.ssh/known_hosts`)
114-
- The easiest way to ensure keys and hosts are all setup and ready if you run into this problem is to run a single git fetch/clone outside gitopolis first. If this proves to be a regular hassle for new users then we could look at doing something about it so add your experience to [issue #236](https://github.com/timabell/gitopolis/issues/236).
115+
- SSH/GPG keys must already be loaded and unlocked in ssh-agent or similar
116+
- Remote SSH host keys must already be accepted (in `~/.ssh/known_hosts`)
117+
- The easiest way to ensure keys and hosts are all setup and ready if you run into this problem is to run a single git fetch/clone outside gitopolis first. If this proves to be a regular hassle for new users then we could look at doing something about it so add your experience to [issue #236](https://github.com/timabell/gitopolis/issues/236).
118+
- Git commands won't pause for pagers (like `less` for `git log`) - this is intentional, but you can pipe the output of gitopolis as a whole into less - e.g. `gitopolis exec -- git log -n 1 | less`
119+
- Git will default to no-color output, but you can [force git's coloured output](https://stackoverflow.com/questions/16073708/force-git-status-to-output-color-on-the-terminal-inside-a-script/18304605#18304605) with `git -c color.ui=always`.
115120

116121
#### Getting output as single lines
117122

0 commit comments

Comments
 (0)