mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-17 11:20:09 +00:00
fix(lib): don't attach to tty in wl-copy
and xclip
(#10953)
Fixes #10925
This commit is contained in:
parent
5336e59db1
commit
4506210c38
1 changed files with 2 additions and 2 deletions
|
@ -58,10 +58,10 @@ function detect-clipboard() {
|
||||||
function clipcopy() { cat "${1:-/dev/stdin}" > /dev/clipboard; }
|
function clipcopy() { cat "${1:-/dev/stdin}" > /dev/clipboard; }
|
||||||
function clippaste() { cat /dev/clipboard; }
|
function clippaste() { cat /dev/clipboard; }
|
||||||
elif [ -n "${WAYLAND_DISPLAY:-}" ] && (( ${+commands[wl-copy]} )) && (( ${+commands[wl-paste]} )); then
|
elif [ -n "${WAYLAND_DISPLAY:-}" ] && (( ${+commands[wl-copy]} )) && (( ${+commands[wl-paste]} )); then
|
||||||
function clipcopy() { wl-copy < "${1:-/dev/stdin}"; }
|
function clipcopy() { wl-copy < "${1:-/dev/stdin}" &>/dev/null &|; }
|
||||||
function clippaste() { wl-paste; }
|
function clippaste() { wl-paste; }
|
||||||
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}" &>/dev/null &|; }
|
||||||
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}"; }
|
||||||
|
|
Loading…
Reference in a new issue