Skip to content

Commit

Permalink
Remove error message when no $DISPLAY or $WAYLAND_DISPLAY
Browse files Browse the repository at this point in the history
  • Loading branch information
eggbean committed Oct 2, 2022
1 parent 1b1a436 commit 589edd9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yank.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ set_error_bindings() {

error_handling_if_command_not_present() {
local copy_command="$1"
if [ -z "$copy_command" ]; then
if [ -n "$DISPLAY ] || [ -n "$WAYLAND_DISPLAY" ]; then
display_present=true
fi
if [ -z "$copy_command" ] && [ -n "$display_present" ]; then
set_error_bindings
exit 0
fi
Expand Down

0 comments on commit 589edd9

Please sign in to comment.