Fix quoting of arguments to kak -c SESSION
Filename arguments to kak -c SESSION are passed to the remote sessions as commands like edit 'FILENAME'; but single-quotes in FILENAME are incorrectly escaped as \' instead of being doubled-up. Fix this so kak -c SESSION "foo'bar" becomes edit 'foo''bar'; instead of edit 'foo\'bar'; Reported by @FlyingWombat in https://github.com/mawww/kakoune/issues/4980
This commit is contained in:
parent
871631bb00
commit
9a0c7cea47
|
@ -1229,7 +1229,7 @@ int main(int argc, char* argv[])
|
|||
}
|
||||
String new_files;
|
||||
for (auto name : files) {
|
||||
new_files += format("edit '{}'", escape(real_path(name), "'", '\\'));
|
||||
new_files += format("edit '{}'", escape(real_path(name), "'", '\''));
|
||||
if (init_coord) {
|
||||
new_files += format(" {} {}", init_coord->line + 1, init_coord->column + 1);
|
||||
init_coord.reset();
|
||||
|
|
Loading…
Reference in New Issue
Block a user