nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] [PATCH] syntax: sh: color options distinctively, and co


From: Brand Huntsman
Subject: Re: [Nano-devel] [PATCH] syntax: sh: color options distinctively, and color also long options
Date: Thu, 29 Mar 2018 02:44:31 -0600

On Thu, 29 Mar 2018 09:55:34 +0200
Benno Schulenberg <address@hidden> wrote:

> >> +# Short and long options.
> >> +color brightmagenta "-[A-Za-z]\>" "--[A-Za-z-]+\>"  
> > 
> > Won't that color the end of filenames and functions that contain a
> > hyphen?  
> 
> Yes, but only if the name ends in a hyphen plus a single letter,
> or the name contains a double hyphen.  The first is somewhat
> unlikely, the latter quite unlikely.

Unlikely? I have thousands of files with double hyphens and also use them in 
function/script names (category/namespace--...). I use my own shell syntax so 
this won't hurt me. But nano shouldn't try to color every character in a 
syntax, less is more. It should only colorize known keywords, not what might be 
something, but often isn't. Single/double hyphen options are not built into any 
shell language, it is just how many programs interpret certain arguments.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]