colorer / Colorer-schemes

Syntax and color schemes for colorer library
30 stars 26 forks source link

[POSIX shell] Correct quoted strings nesting #65

Open AnrDaemon opened 6 years ago

AnrDaemon commented 6 years ago

Right now, POSIX shell scripts' highlighting is broken on constructs such as

_target="$( readlink -fe "$1" )"

In short, it does not pick $( ) capture correctly. If anybody can provide with pointers about fixing it, I would gladly appreciate the help.

ctapmex commented 4 months ago

fixed in https://github.com/colorer/Colorer-schemes/releases/tag/v1.2.0.36

AnrDaemon commented 4 months ago

The new types Shell Scripts (POSIX) and Shell Scripts (bash) do not color sources at all. Selecting the sh/ksh/bash script manually will enable coloring as always, but the reported issue remains.

chpock commented 4 months ago

@AnrDaemon could you please provide an example of shell script that is not highlighted?

AnrDaemon commented 4 months ago
#!/bin/sh
true
AnrDaemon commented 2 months ago

ping?

ctapmex commented 2 months ago

check latest version. image

if something doesn't work yet, then an example is needed.

AnrDaemon commented 2 months ago

At this point, the best I can do is to zip an entire base directory. base-2024-05-01.zip

ctapmex commented 2 months ago

Sorry, I didn't understand the last one. This is your set of schemes, and? Yes, it's old, with something homemade. What should we understand from this?

AnrDaemon commented 2 months ago

It's last released schemes with minimal custom additions. All changes are in "auto" directory. But removing them makes no change. Any idea what could be the cause?

AnrDaemon commented 2 months ago

Another bit of information I just noticed:

  1. Open the .sh/.bash/wtf file.
  2. Manually(!) change the coloring scheme to something inapproprite. (Regedit, XML, whatever.) Entire file turns red.
  3. Change the scheme back to Shell (POSIX). Coloring do not change, the file's still red.
  4. Change the scheme to Shell (bash). Coloring disappears.

This makes me think the issue is somewhere inside the "Shell (POSIX)" theme, as "Shell (bash)" inherit from it.

ctapmex commented 2 months ago

which version of far and far colorer is used? the described behavior depends only on them. The schemes have nothing to do with it.

AnrDaemon commented 2 months ago

Far 2.0.0.1807 FarColorer 1.0.3.7

ctapmex commented 2 months ago

Oh, this is a very old version. I find it difficult to say how it works. But according to your description, there are problems with redrawing after selecting a new file type. moving the cursor should help, as an option.

AnrDaemon commented 1 month ago

Then my guess is that the new scheme uses something older Colorer do not understand. I'll have to dig out, what is it.