diff --git a/share/functions/__fish_commandline_is_singlequoted.fish b/share/functions/__fish_commandline_is_singlequoted.fish index 7a3a81a29..2c421358e 100644 --- a/share/functions/__fish_commandline_is_singlequoted.fish +++ b/share/functions/__fish_commandline_is_singlequoted.fish @@ -1,5 +1,5 @@ # TODO: This function is deprecated. It was used in fish_clipboard_paste # which some users copied, so maybe leave it around for a few years. function __fish_commandline_is_singlequoted --description "Return 0 if the current token has an open single-quote" - string match -q 'single*' (__fish_tokenizer_state -- (commandline -ct)) + string match -q 'single*' (__fish_tokenizer_state -- (commandline -ct | string collect)) end diff --git a/share/functions/__fish_shared_key_bindings.fish b/share/functions/__fish_shared_key_bindings.fish index a57fd053f..93ae2e8bf 100644 --- a/share/functions/__fish_shared_key_bindings.fish +++ b/share/functions/__fish_shared_key_bindings.fish @@ -182,7 +182,7 @@ function __fish_start_bracketed_paste set -g __fish_last_bind_mode $fish_bind_mode # If the token is currently single-quoted, # we escape single-quotes (and backslashes). - __fish_commandline_is_singlequoted + string match -q 'single*' (__fish_tokenizer_state -- (commandline -ct | string collect)) and set -g __fish_paste_quoted 1 end