Compare commits

...

6 Commits

Author SHA1 Message Date
zwyyy456 79645d1a1a
Merge 3ce427d196 into 6e9cda3d30 2025-01-22 12:17:34 +01:00
dependabot[bot] 6e9cda3d30
chore(deps): bump semver in /.github/workflows/dependencies (#12924)
Bumps [semver](https://github.com/python-semver/python-semver) from 3.0.2 to 3.0.3.
- [Release notes](https://github.com/python-semver/python-semver/releases)
- [Changelog](https://github.com/python-semver/python-semver/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/python-semver/python-semver/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-19 23:30:40 +01:00
zwy 3ce427d196 feat(clipboard, copybuffer): fix typo, add 'yy' to yank buffer in vi-normal mode 2024-12-29 22:10:23 +09:00
zwy 7bdca23779 Merge remote-tracking branch 'zwyyy/master' 2024-12-29 22:08:15 +09:00
zwyyy456 32b4d285c3 fix(typo): make the name of local varialbe more readable 2024-12-29 17:07:13 +08:00
zwyyy456 44f7c5798e feat(clipboard): add simple osc52 support 2024-12-29 16:47:56 +08:00
3 changed files with 13 additions and 1 deletions

View File

@ -3,5 +3,5 @@ charset-normalizer==3.4.1
idna==3.10 idna==3.10
PyYAML==6.0.2 PyYAML==6.0.2
requests==2.32.3 requests==2.32.3
semver==3.0.2 semver==3.0.3
urllib3==2.3.0 urllib3==2.3.0

View File

@ -84,6 +84,17 @@ function detect-clipboard() {
elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then
function clipcopy() { tmux load-buffer "${1:--}"; } function clipcopy() { tmux load-buffer "${1:--}"; }
function clippaste() { tmux save-buffer -; } function clippaste() { tmux save-buffer -; }
elif [[ "$TERM" == "xterm"* || "$TERM" == "screen"* || "$TERM" == "tmux"* ]]; then
# OSC 52 support
function clipcopy() {
local content_tocopy
content_tocopy=$(cat "${1:-/dev/stdin}" | base64 | tr -d '\n')
printf "\033]52;c;%s\a" "$content_tocopy" > /dev/tty
}
function clippaste() {
echo "OSC 52 does not support pasting from the clipboard."
return 1
}
else else
function _retry_clipboard_detection_or_fail() { function _retry_clipboard_detection_or_fail() {
local clipcmd="${1}"; shift local clipcmd="${1}"; shift

View File

@ -14,3 +14,4 @@ zle -N copybuffer
bindkey -M emacs "^O" copybuffer bindkey -M emacs "^O" copybuffer
bindkey -M viins "^O" copybuffer bindkey -M viins "^O" copybuffer
bindkey -M vicmd "^O" copybuffer bindkey -M vicmd "^O" copybuffer
bindkey -M vicmd "yy" copybuffer