Skip to content

Commit cf596b0

Browse files
committed
Add Script environment variable docs
1 parent d76481c commit cf596b0

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

Diff for: โ€ŽREADME.md

+24
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,17 @@ cb p
13631363

13641364
<br>
13651365

1366+
<h3><b><code>CLIPBOARD_ACTION</code> &emsp; CB will set this to the current action when running a script. </b></h3>
1367+
1368+
Start with a script.
1369+
```sh
1370+
$ cb script ls
1371+
$ cb history
1372+
# Now, whatever script CB runs will have access to the CLIPBOARD_ACTION environment variable, here with value "history"
1373+
```
1374+
1375+
<br>
1376+
13661377
<h3><b><code>CLIPBOARD_EDITOR</code> &emsp; Set this to the editor you want to use for the Edit action. </b></h3>
13671378

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

14201431
<br>
14211432

1433+
<h3><b><code>CLIPBOARD_SCRIPT_TIMING</code> &emsp; CB will set this to the timing of the script that it runs.</b></h3>
1434+
1435+
Start with a script.
1436+
```sh
1437+
$ cb script ls
1438+
$ cb history
1439+
# Now, whatever script CB runs will have access to the CLIPBOARD_SCRIPT_TIMING environment variable, here with value "before"
1440+
# (output of "cb history")
1441+
# Now, CLIPBOARD_SCRIPT_TIMING will have value "after"
1442+
```
1443+
1444+
<br>
1445+
14221446
<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>
14231447

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

Diff for: โ€Ždocumentation/website/content/_docs.md

+24
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,17 @@ cb p
965965

966966
<br>
967967

968+
<h3><b><code>CLIPBOARD_ACTION</code> &emsp; CB will set this to the current action when running a script. </b></h3>
969+
970+
Start with a script.
971+
```sh
972+
$ cb script ls
973+
$ cb history
974+
# Now, whatever script CB runs will have access to the CLIPBOARD_ACTION environment variable, here with value "history"
975+
```
976+
977+
<br>
978+
968979
<h3><b><code>CLIPBOARD_EDITOR</code> &emsp; Set this to the editor you want to use for the Edit action. </b></h3>
969980

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

10221033
<br>
10231034

1035+
<h3><b><code>CLIPBOARD_SCRIPT_TIMING</code> &emsp; CB will set this to the timing of the script that it runs.</b></h3>
1036+
1037+
Start with a script.
1038+
```sh
1039+
$ cb script ls
1040+
$ cb history
1041+
# Now, whatever script CB runs will have access to the CLIPBOARD_SCRIPT_TIMING environment variable, here with value "before"
1042+
# (output of "cb history")
1043+
# Now, CLIPBOARD_SCRIPT_TIMING will have value "after"
1044+
```
1045+
1046+
<br>
1047+
10241048
<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>
10251049

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

0 commit comments

Comments
ย (0)