Skip to content

Commit d090f6b

Browse files
Update README.md
1 parent 62080bf commit d090f6b

File tree

1 file changed

+26
-4
lines changed

1 file changed

+26
-4
lines changed

README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,35 @@ $ git-sim [global options] <subcommand> [subcommand options]
6262

6363
5) Simulated output will be created as a `.jpg` file. Output files are named using the subcommand executed combined with a timestamp, and by default are stored in a subdirectory called `git-sim_media/`. The location of this subdirectory is customizable using the command line flag `--media-dir=path/to/output`. Note that when the `--animate` global flag is used, render times will be much longer and a `.mp4` video output file will be produced.
6464

65-
6) See global help for list of global options/flags and subcommands:
65+
6) For convenience, environment variables can be set for any global command-line option available in git-sim. All environment variables start with `git_sim_` followed by the name of the option.
66+
67+
For example, the `--media-dir` option can be set as an environment variable like:
68+
69+
```console
70+
$ export git_sim_media_dir=~/Desktop
71+
```
72+
73+
Similarly, the `--speed` option can be set like:
74+
75+
```console
76+
$ export git_sim_speed=2
77+
```
78+
79+
Or, more generally:
80+
81+
```console
82+
$ export git_sim_option_name=option_value
83+
```
84+
85+
Explicitly specifying options at the command-line takes precedence over the corresponding environment variable values.
86+
87+
7) See global help for list of global options/flags and subcommands:
6688

6789
```console
6890
$ git-sim -h
6991
```
7092

71-
7) See subcommand help for list of options/flags for a specific subcommand:
93+
8) See subcommand help for list of options/flags for a specific subcommand:
7294

7395
```console
7496
$ git-sim <subcommand> -h
@@ -90,7 +112,7 @@ The `[global options]` apply to the overarching `git-sim` simulation itself, inc
90112

91113
`--light-mode`: Use a light mode color scheme instead of default dark mode.
92114
`--animate`: Instead of outputting a static image, animate the Git command behavior in a .mp4 video.
93-
`--disable-auto-open, -d`: Disable the automatic opening of the image/video file after generation.
115+
`-d`: Disable the automatic opening of the image/video file after generation. Useful to avoid errors in console mode with no GUI.
94116
`--reverse, -r`: Display commit history in the reverse direction.
95117
`--img-format`: Output format for the image file, i.e. `jpg` or `png`. Default output format is `jpg`.
96118
`--stdout`: Write raw image data to stdout while suppressing all other program output.
@@ -363,7 +385,7 @@ Optionally, set the environment variable `git_sim_media_dir` to set a global def
363385
$ export git_sim_media_dir=path/to/media/directory
364386
$ git-sim status
365387
```
366-
Note: `--media-dir` takes precedence over the environment variable. If you set the environment and still provide the argument, you'll find the media in the path provided by `--media-dir`.
388+
Note: `--media-dir` takes precedence over the environment variable. If you set the environment variable and still provide the argument, you'll find the media in the path provided by `--media-dir`.
367389

368390
Generate output video in low quality to speed up rendering time (useful for repeated testing, must include `--animate`):
369391

0 commit comments

Comments
 (0)