From 96225344bec51e2c6e02bbf5277188e29864627e Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Sat, 19 Jun 2021 11:55:31 +0200 Subject: [PATCH] zsh: osc 52 clipboard copy --- .zshrc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 5cba5e9..f2edba9 100644 --- a/.zshrc +++ b/.zshrc @@ -98,7 +98,11 @@ export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) ## Pager export LESS="--mouse --wheel-lines=1 -nRXF" +## Clipboard OSC 52 + function clip { echo -en "\x1b]52;c;$(base64 -w0)\x07" } + ## Aliases +alias c='cut -c-${COLUMNS}' alias dotgit='git --work-tree $HOME --git-dir $HOME/.dot_git' alias l=bat alias ls=exa @@ -107,8 +111,7 @@ alias timestamp='TZ=Z date "+%Y%m%dT%H%M%SZ"' alias tree='exa --tree' alias v=vgrep alias ve='env EDITOR= vgrep -s' -alias xc='xclip -selection clipboard' -alias c='cut -c-${COLUMNS}' +alias xc=clip