clipboard: Fix bad expansion of exit-code test

This commit is contained in:
Robert Estelle 2019-07-14 12:56:48 -04:00
parent 841008c947
commit d81cd753e0

View file

@ -63,7 +63,7 @@ function detect-clipboard() {
elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xclip]} )); then elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xclip]} )); then
function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; } function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
function clippaste() { xclip -out -selection clipboard; } function clippaste() { xclip -out -selection clipboard; }
elif [ -n "${DISPLAY:-}" ] && $(( ${+commands[xsel]} )); then elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xsel]} )); then
function clipcopy() { xsel --clipboard --input < "${1:-/dev/stdin}"; } function clipcopy() { xsel --clipboard --input < "${1:-/dev/stdin}"; }
function clippaste() { xsel --clipboard --output; } function clippaste() { xsel --clipboard --output; }
elif (( ${+commands[lemonade]} )); then elif (( ${+commands[lemonade]} )); then