diff --git a/share/functions/fish_clipboard_copy.fish b/share/functions/fish_clipboard_copy.fish index 47fa8264a..6bb60a473 100644 --- a/share/functions/fish_clipboard_copy.fish +++ b/share/functions/fish_clipboard_copy.fish @@ -3,14 +3,14 @@ function fish_clipboard_copy set -l cmdline (commandline --current-selection) test -n "$cmdline"; or set cmdline (commandline) if type -q pbcopy - printf '%s\n' $cmdline | pbcopy + printf '%s' $cmdline | pbcopy else if set -q WAYLAND_DISPLAY; and type -q wl-copy - printf '%s\n' $cmdline | wl-copy + printf '%s' $cmdline | wl-copy else if type -q xsel # Silence error so no error message shows up # if e.g. X isn't running. - printf '%s\n' $cmdline | xsel --clipboard 2>/dev/null + printf '%s' $cmdline | xsel --clipboard 2>/dev/null else if type -q xclip - printf '%s\n' $cmdline | xclip -selection clipboard 2>/dev/null + printf '%s' $cmdline | xclip -selection clipboard 2>/dev/null end end