1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-09-21 07:20:09 +00:00

feat(vi-mode): add option to disable clipboard (#12037)

This commit is contained in:
Þórhallur Sverrisson 2023-11-20 11:27:54 +00:00 committed by GitHub
parent 6165c257ae
commit e0213342d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 9 deletions

View file

@ -37,6 +37,8 @@ plugins=(... vi-mode)
- `INSERT_MODE_INDICATOR`: controls the string displayed when the shell is in insert mode.
See [Mode indicators](#mode-indicators) for details.
- `VI_MODE_DISABLE_CLIPBOARD`: If set, disables clipboard integration on yank/paste
## Mode indicators
*Normal mode* is indicated with a red `<<<` mark at the right prompt, when it

View file

@ -147,6 +147,7 @@ function wrap_clipboard_widgets() {
done
}
if [[ -z "${VI_MODE_DISABLE_CLIPBOARD:-}" ]]; then
wrap_clipboard_widgets copy \
vi-yank vi-yank-eol vi-yank-whole-line \
vi-change vi-change-eol vi-change-whole-line \
@ -158,6 +159,7 @@ wrap_clipboard_widgets paste \
put-replace-selection
unfunction wrap_clipboard_widgets
fi
# if mode indicator wasn't setup by theme, define default, we'll leave INSERT_MODE_INDICATOR empty by default
if [[ -z "$MODE_INDICATOR" ]]; then