Don't highlight backslash-escaped brackets#777
Don't highlight backslash-escaped brackets#777rolandwalker wants to merge 1 commit intozsh-users:masterfrom
Conversation
49d5806 to
4662324
Compare
|
I'm curious what the real world use case is that motivated this PR. A difference between On the PR itself just a few nits. L50 the variables are sorted alphabetically; please keep them in order. For the test I know the script uses Other than those minor points the PR looks technically good. The question is should backslash escaped brackets be ignored. |
What would your next PR do? |
|
@phy1729 Thank you for the review! The motivation was that I have been writing a lot of Lisp at the command-line, using tools like babashka, simple example That is why it started to make sense to me to balance brackets within strings, though I think it would be better if each string was isolated and treated independently. @danielshahaf I would like to add another bracket-highlighting style which highlights the balanced pair of containing brackets for any point the cursor may be on. |
4662324 to
12b648e
Compare
12b648e to
66d1d20
Compare
I've looked at #532, #533, #455, and am not entirely sure of your current thinking on this.
This PR addresses only backslash escaping. Current highlighting:

with patch:

Let me know if this is agreeable, and if so I will figure out how to add a test.Nice setup —tests/generate.zshis easy.This coding choice is idiosyncratic:
but if this PR is accepted it will make a cleaner diff with my next one.