Skip to content

Commit 1eb00d8

Browse files

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/Config.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,32 +649,39 @@ os:
649649
```
650650
651651
## Custom Command for Opening a Link
652+
652653
```yaml
653654
os:
654655
openLink: 'bash -C /path/to/your/shell-script.sh {{link}}'
655656
```
657+
656658
Specify the external command to invoke when opening URL links (i.e. creating MR/PR in GitLab, BitBucket or GitHub). `{{link}}` will be replaced by the URL to be opened. A simple shell script can be used to further mangle the passed URL.
657659

658660
## Custom Command for Copying to and Pasting from Clipboard
661+
659662
```yaml
660663
os:
661664
copyToClipboardCmd: ''
662665
```
666+
663667
Specify an external command to invoke when copying to clipboard is requested. `{{text}` will be replaced by text to be copied. Default is to copy to system clipboard.
664668

665669
If you are working on a terminal that supports OSC52, the following command will let you take advantage of it:
670+
666671
```yaml
667672
os:
668673
copyToClipboardCmd: printf "\033]52;c;$(printf {{text}} | base64 -w 0)\a" > /dev/tty
669674
```
670675

671676
For tmux you need to wrap it with the [tmux escape sequence](https://github.com/tmux/tmux/wiki/FAQ#what-is-the-passthrough-escape-sequence-and-how-do-i-use-it), and enable passthrough in tmux config with `set -g allow-passthrough on`:
677+
672678
```yaml
673679
os:
674680
copyToClipboardCmd: printf "\033Ptmux;\033\033]52;c;$(printf {{text}} | base64 -w 0)\a\033\\" > /dev/tty
675681
```
676682

677683
For the best of both worlds, we can let the command determine if we are running in a tmux session and send the correct sequence:
684+
678685
```yaml
679686
os:
680687
copyToClipboardCmd: >
@@ -686,10 +693,12 @@ os:
686693
```
687694

688695
A custom command for reading from the clipboard can be set using
696+
689697
```yaml
690698
os:
691699
readFromClipboardCmd: ''
692700
```
701+
693702
It is used, for example, when pasting a commit message into the commit message panel. The command is supposed to output the clipboard content to stdout.
694703

695704
## Configuring File Editing
@@ -960,6 +969,7 @@ In situations where certain naming pattern is used for branches, this can be use
960969
Example:
961970

962971
Some branches:
972+
963973
- jsmith/AB-123
964974
- cwilson/AB-125
965975

0 commit comments

Comments
 (0)