From ec92e91ddc9f2a67e8d115f608752ce5b6ced23b Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sun, 23 Apr 2017 13:40:40 +0200 Subject: [PATCH] fish_clipboard_paste: Turn \r into \n We already do this in bracketed-paste because it's really confusing to have a \r literal in the commandline. --- share/functions/fish_clipboard_paste.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/share/functions/fish_clipboard_paste.fish b/share/functions/fish_clipboard_paste.fish index 8e3557a54..232a0a80a 100644 --- a/share/functions/fish_clipboard_paste.fish +++ b/share/functions/fish_clipboard_paste.fish @@ -11,6 +11,10 @@ function fish_clipboard_paste return 1 end end + # Also split on \r to turn it into a newline, + # otherwise the output looks really confusing. + set data (string split \r -- $data) + # If the current token has an unmatched single-quote, # escape all single-quotes (and backslashes) in the paste, # in order to turn it into a single literal token.