Skip to content

Commit 589edd9

Browse files
committed
Remove error message when no $DISPLAY or $WAYLAND_DISPLAY
1 parent 1b1a436 commit 589edd9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

yank.tmux

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ set_error_bindings() {
2828

2929
error_handling_if_command_not_present() {
3030
local copy_command="$1"
31-
if [ -z "$copy_command" ]; then
31+
if [ -n "$DISPLAY ] || [ -n "$WAYLAND_DISPLAY" ]; then
32+
display_present=true
33+
fi
34+
if [ -z "$copy_command" ] && [ -n "$display_present" ]; then
3235
set_error_bindings
3336
exit 0
3437
fi

0 commit comments

Comments
 (0)