fish_clipboard_paste: Only trim leading whitespace on first line

We remove leading spaces so a paste isn't histignored, but we did so
on all lines, which removed indentation.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-05-11 11:19:21 +02:00
parent 4462f6d600
commit 816df47c10

View File

@ -35,7 +35,7 @@ function fish_clipboard_paste
if not string length -q -- (commandline -c)
# If we're at the beginning of the first line, trim whitespace from the start,
# so we don't trigger ignoring history.
set data (string trim -l -- $data)
set data[1] (string trim -l -- $data[1])
end
if test -n "$data"
commandline -i -- $data