-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
A readline flag #180
Comments
Probably related to this? #102 If so, this (#102 (comment)) is the solution. |
Could you please provide a use case that motivates this feature? What does this provide that single quotes or even |
It's faster to type. |
@ticki I'd like some examples please. I'm particularly interested in examples that are common. Are there other tools that implement this particular feature? I can't recall seeing it before. |
Another problem I kind of have with this feature is that it breaks shell history. When I run a I do agree that handling escapes is annoying, although I'm not sure how often it comes up in practice. I'd appreciate some brainstorming with other ways to fix this. One idea is #7, although committing the pattern to a file is a bit heavyweight just to avoid escapes, but it does not suffer from the shell history problem (because I can just edit the file). |
I was thinking about this last night before bed. So I guess it doesn't necessarily have to break shell history. If you did:
Then scrolling back to this command will preserve the heredoc, which I think satisfies at least one important objection to this feature. It does however mean that you can't search |
If #7 is resolved then you could handle |
OK, I'm closing this in favor of doing #7 with support for stdin. |
@ticki FYI, this is done. This works now (master, will be in next
heredocs work too:
|
Regular expressions do not work well together with shells, due to escapes, canonicalization, and parsing. I suggest that a flag for reading a line from the user (
-r
or-R
) and using this as the regex, effectively bypassing the shell weirdness.This could possibly even be the behavior when no argument is given.
The text was updated successfully, but these errors were encountered: