mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-30 17:41:14 -03:00
Fix clipboard_paste nicer
Instead of hacking in arbitrary characters to avoid splitting, just
use `string collect`.
This reverts commit e450190d50.
Fixes #7782, but nicer.
This commit is contained in:
@@ -26,7 +26,7 @@ function fish_clipboard_paste
|
||||
# in order to turn it into a single literal token.
|
||||
#
|
||||
# This eases pasting non-code (e.g. markdown or git commitishes).
|
||||
set -l quote_state (__fish_tokenizer_state -- (commandline -ct))
|
||||
set -l quote_state (__fish_tokenizer_state -- (commandline -ct | string collect))
|
||||
if contains -- $quote_state single single-escaped
|
||||
if status test-feature regex-easyesc
|
||||
set data (string replace -ra "(['\\\])" '\\\\$1' -- $data)
|
||||
|
||||
Reference in New Issue
Block a user