bugGNU nano - Bugs: bug #53486, the shell syntax colors...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #53486: the shell syntax colors "tar" in file.tar.gz as if it were a command

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Tue 27 Mar 2018 12:20:31 PM UTC  
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  Benno Schulenberg <bens> Open/Closed:  Closed

Fri 30 Mar 2018 09:25:10 AM UTC, comment #3: 

(The coloring has subsequently been improved in commit cf1129a8.)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Wed 28 Mar 2018 12:48:16 PM UTC, comment #2: 

Fixed in git, commit 20d1823d.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 27 Mar 2018 06:35:11 PM UTC, comment #1: 

Attached patch uncolors the "tar"s that are part of a filename.
(It depends on the "normal" patch posted in
http://lists.gnu.org/archive/html/nano-devel/2018-03/msg00114.html.)

(file #43700)

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Tue 27 Mar 2018 12:20:31 PM UTC, original submission:  

When a shell script contains a line like:

  tar -cvzf  file.tar.gz  somedir

then both the tar command itself and the word "tar" inside "file.tar.gz" are colored bright blue.  The latter is wrong.

One could change the command-coloring regex to require that any command is followed by a space or by end-of-line, but that is not good enough: a command could also be followed by a semicolon or a &&, and we don't want to color those.  So... probably it is best to recolor "tar" to normal when it is followed by a period.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Submitted the item)
  • -email is unavailable- added by bens
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-03-30 bens Open/ClosedOpen => Closed
    2018-03-28 bens StatusIn Progress => Fixed
    2018-03-27 bens Attached File- => Added 0001-syntax-sh-uncolor-tar-when-it-s-part-of-a-filename.patch, #43700
        Severity3 - Normal => 2 - Minor
        StatusNone => In Progress
        Assigned toNone => bens
    2018-03-27 bens Carbon-Copy- => Added vapier

    Back to the top


    Powered by Savane 3.5