cb-Alias: Linux-kompatibel via xclip (macOS bleibt pbpaste/pbcopy)

This commit is contained in:
rene 2026-04-02 16:27:15 +02:00
parent 4c2d7db69b
commit b8337f2762

View file

@ -75,7 +75,11 @@ alias gp='git push'
alias gl='git log --oneline --graph --decorate'
alias gitcheck="~/git-check-all.sh --short"
alias gitupdate="~/git-update-all.sh"
if [[ "$OSTYPE" == "darwin"* ]]; then
alias cb="pbpaste | sed 's/^ //' | pbcopy"
else
alias cb="xclip -selection clipboard -o | sed 's/^ //' | xclip -selection clipboard -i"
fi
# Ubuntu-Kompatibilitaet: fd und bat heissen dort anders
command -v fdfind &>/dev/null && ! command -v fd &>/dev/null && alias fd='fdfind'
command -v batcat &>/dev/null && ! command -v bat &>/dev/null && alias bat='batcat'