diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-03-06 13:04:31 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-06 13:20:41 +0100 |
commit | a76730823ab3b7e125ea501e095a3ffd25a7dd18 (patch) | |
tree | 133fe8212d15532bd2888f4cdcc3c68b42662362 /Toolchain/BuildMold.sh | |
parent | c4d937747751d59ca3a5a1c04f608a0ccb2ee9b0 (diff) | |
download | serenity-a76730823ab3b7e125ea501e095a3ffd25a7dd18.zip |
Shell: Be more smart with pasted stuff
Shell can now use LibLine's `on_paste` hook to more intelligently escape
pasted data, with the following heuristics:
- If the current command is invalid, just pile the pasted string on top
- If the cursor is *after* a command node, escape the pasted data,
whichever way yields a smaller encoding
- If the cursor is at the start of or in the middle of a command name,
paste the data as-is, assuming that the user wants to paste code
- If the cursor is otherwise in some argument, escape the pasted data
according to which kind of string the cursor is in the middle of
(double-quoted, single-quoted or a simple bareword)
Diffstat (limited to 'Toolchain/BuildMold.sh')
0 files changed, 0 insertions, 0 deletions