view bin/executable_clip @ 758:3a07cc5c825a

feat: add global expanding shortcuts copied from https://stackoverflow.com/questions/28573145/how-can-i-move-the-cursor-after-a-zsh-abbreviation
author zegervdv <zegervdv@me.com>
date Fri, 10 Mar 2023 16:02:39 +0000
parents eba1dee43703
children
line wrap: on
line source

#!/usr/bin/env bash

DATA=$(cat - | sed -r "s/\x1b\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" | base64)

if [ -z "$TMUX" ]; then
  echo -ne "\e]52;c;${DATA}\x07"
else
  echo -ne "\ePtmux;\e\e]52;c;${DATA}\x07\e\\"
fi