mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-26 11:45:08 +00:00
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.
This commit is contained in:
parent
cc7d83fa94
commit
ec92e91ddc
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,10 @@ function fish_clipboard_paste
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
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,
|
# If the current token has an unmatched single-quote,
|
||||||
# escape all single-quotes (and backslashes) in the paste,
|
# escape all single-quotes (and backslashes) in the paste,
|
||||||
# in order to turn it into a single literal token.
|
# in order to turn it into a single literal token.
|
||||||
|
|
Loading…
Reference in a new issue