1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-16 12:07:34 +00:00
serenity/Userland/Shell
Ali Mohammad Pur a76730823a 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)
2022-03-06 13:20:41 +01:00
..
Tests
AST.cpp Shell: Implement leftmost_trivial_literal() for Sequence nodes 2022-03-06 13:20:41 +01:00
AST.h Shell: Implement leftmost_trivial_literal() for Sequence nodes 2022-03-06 13:20:41 +01:00
Builtin.cpp Shell: Start history counter from 1 2022-02-22 21:26:25 +03:30
CMakeLists.txt Shell: Port to LibMain 2022-01-09 03:22:10 +03:30
Execution.h
Formatter.cpp
Formatter.h
Forward.h
ImmediateFunctions.cpp Shell: Allow completing StringLiterals as paths 2022-03-06 13:20:41 +01:00
Job.cpp
Job.h
main.cpp Shell: Be more smart with pasted stuff 2022-03-06 13:20:41 +01:00
NodeVisitor.cpp
NodeVisitor.h
Parser.cpp Shell: Allow completing StringLiterals as paths 2022-03-06 13:20:41 +01:00
Parser.h
Shell.cpp Shell: Be more smart with pasted stuff 2022-03-06 13:20:41 +01:00
Shell.h Shell: Be more smart with pasted stuff 2022-03-06 13:20:41 +01:00
SyntaxHighlighter.cpp Shell: Use an opaque color for SyntaxError 2022-02-23 21:56:16 +00:00
SyntaxHighlighter.h