-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command Line: Add support for line continuation #3326
Command Line: Add support for line continuation #3326
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the cool PR @at055612!
The general approach looks good to me. I just a few minor nits here and there.
Co-authored-by: Michael Schmidt <msrd0000@gmail.com>
Opacity works better with the different themes. Preventing user-select on shell output allows you to copy just the commands for pasting into a shell.
I agree with the color change but not with the People not wanting to select the output is a pretty big assumption. If they really didn't want the output to be selectable, then they could still add that themselves. However, it's a no-go for a syntax highlighter to make the highlighted non-selectable by default. I also want to point out that the color change should have been its own PR. The change is completely independent of the line continuation feature but I can only merge it once we have line continuations ready. You can keep the color change in this PR, but, in the future, please try to make many smaller PRs instead of one big one. |
Also improve help page.
I thought it might be contentious. I will remove it and add some words to the html page saying how to do it you want to.
Yes, sorry, was a bit naughty but I figured it was a tiny change that I could sneak in. Noted. |
Thank you for contributing @at055612! |
@RunDevelopment Thanks for the merge. Sorry for all the back/forth. |
Comand line plugin
Adds the following data attributes to allow you to show multi-line commands that have line continuation characters/strings.
data-continuation-prompt
data-continuation-str
This effectively changes the prompt for the continued lines as show in the updated help page for the plugin. If
data-continuation-str
is not set then the plugin will behave as before, though maybe it should default to\
for posix shell.This is how it looks without this PR. It is hard to see what is a command and what is a continued line.