Skip to content

Commit

Permalink
Add Script environment variable docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Slackadays committed Nov 16, 2024
1 parent d76481c commit cf596b0
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,17 @@ cb p

<br>

<h3><b><code>CLIPBOARD_ACTION</code> &emsp; CB will set this to the current action when running a script. </b></h3>

Start with a script.
```sh
$ cb script ls
$ cb history
# Now, whatever script CB runs will have access to the CLIPBOARD_ACTION environment variable, here with value "history"
```

<br>

<h3><b><code>CLIPBOARD_EDITOR</code> &emsp; Set this to the editor you want to use for the Edit action. </b></h3>

Set a custom editor to use.
Expand Down Expand Up @@ -1419,6 +1430,19 @@ $ CLIPBOARD_LOCALE="" cb cp Foobar

<br>

<h3><b><code>CLIPBOARD_SCRIPT_TIMING</code> &emsp; CB will set this to the timing of the script that it runs.</b></h3>

Start with a script.
```sh
$ cb script ls
$ cb history
# Now, whatever script CB runs will have access to the CLIPBOARD_SCRIPT_TIMING environment variable, here with value "before"
# (output of "cb history")
# Now, CLIPBOARD_SCRIPT_TIMING will have value "after"
```

<br>

<h3><b><code>CLIPBOARD_TMPDIR</code> &emsp; Set this to the directory that only CB will use to hold the items you cut or copy into a temporary directory.</b></h3>

Choose a special place to put your temporary clipboards this one time.
Expand Down
24 changes: 24 additions & 0 deletions documentation/website/content/_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,17 @@ cb p

<br>

<h3><b><code>CLIPBOARD_ACTION</code> &emsp; CB will set this to the current action when running a script. </b></h3>

Start with a script.
```sh
$ cb script ls
$ cb history
# Now, whatever script CB runs will have access to the CLIPBOARD_ACTION environment variable, here with value "history"
```

<br>

<h3><b><code>CLIPBOARD_EDITOR</code> &emsp; Set this to the editor you want to use for the Edit action. </b></h3>

Set a custom editor to use.
Expand Down Expand Up @@ -1021,6 +1032,19 @@ $ CLIPBOARD_LOCALE="" cb cp Foobar

<br>

<h3><b><code>CLIPBOARD_SCRIPT_TIMING</code> &emsp; CB will set this to the timing of the script that it runs.</b></h3>

Start with a script.
```sh
$ cb script ls
$ cb history
# Now, whatever script CB runs will have access to the CLIPBOARD_SCRIPT_TIMING environment variable, here with value "before"
# (output of "cb history")
# Now, CLIPBOARD_SCRIPT_TIMING will have value "after"
```

<br>

<h3><b><code>CLIPBOARD_TMPDIR</code> &emsp; Set this to the directory that only CB will use to hold the items you cut or copy into a temporary directory.</b></h3>

Choose a special place to put your temporary clipboards this one time.
Expand Down

0 comments on commit cf596b0

Please sign in to comment.