mirror of
https://github.com/mawww/kakoune.git
synced 2024-09-11 13:00:41 +03:00
rc patch.kak: fix quoting
I learned that $ foo="'1 2'" $ echo $foo '1 2' Quote some variables to avoid this double unescaping.
This commit is contained in:
parent
11e7e2964c
commit
2c944f6415
@ -43,7 +43,7 @@ define-command diff-jump -params .. -docstring %{
|
||||
}
|
||||
set-register a %arg{@}
|
||||
set-register | %{
|
||||
[ -n "$kak_reg_a" ] && eval set -- $kak_quoted_reg_a
|
||||
[ -n "$kak_reg_a" ] && eval set -- "$kak_quoted_reg_a"
|
||||
cmd=$(column=$kak_reg_c perl -we '
|
||||
sub quote {
|
||||
$SQ = "'\''";
|
||||
|
@ -52,7 +52,7 @@ define-command patch -params .. -docstring %{
|
||||
# Since registers are never empty, we get an empty arg even if
|
||||
# there were no args. This does no harm because we pass it to
|
||||
# a shell where it expands to nothing.
|
||||
eval set -- $kak_quoted_reg_a
|
||||
eval set -- "$kak_quoted_reg_a"
|
||||
|
||||
perl "${kak_reg_f%/*}/patch-range.pl" $min_line $max_line "$@" ||
|
||||
echo >$kak_command_fifo "set-register e fail 'patch: failed to apply selections, see *debug* buffer'"
|
||||
|
Loading…
Reference in New Issue
Block a user