bugGNU nano - Bugs: bug #43270, Nano doesn't understand...

 
 

bug #43270: Nano doesn't understand #!/usr/bin/env bash for syntax highlighting

Submitted by:  None
Submitted on:  Sun 21 Sep 2014 02:14:42 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 21 Oct 2014 07:12:51 PM UTC, comment #4:

Thanks for verifying.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Mon 22 Sep 2014 07:15:15 AM UTC, comment #3:

Hi,

Compiled and tested trunk seems to work now thanks for the fix.

Kitty

Anonymous
Sun 21 Sep 2014 03:34:21 PM UTC, comment #2:

Thanks for reporting. Indeed, this is a little bug. Nano will recognize the syntax highlighting to use primarily from the extension of the file name. But if the file name has no extension, nano will try to recognize the header line.

This recognition was a bit too restrictive, and has now been fixed in SVN, r5095. This fix will be released in version 2.3.7, when it comes out.

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sun 21 Sep 2014 02:56:01 PM UTC, comment #1:

Hi,

I overlooked including my nano version, nano reports 2.2.6 itself and Debian says the package version is 2.2.6-3.

Kitty

Anonymous
Sun 21 Sep 2014 02:14:42 PM UTC, original submission:

Hi,

#!/bin/bash triggers syntax highlighting as you would imagine, how ever #!/usr/bin/env bash doesn't in one case:

$ for i in test*; do echo "$i"; cat "$i"; done
test
#!/usr/bin/env bash <- doesn't work
test.sh
#!/usr/bin/env bash <- works

$ for i in test*; do echo "$i"; cat "$i"; done
test
#!/bin/bash <- works
test.sh
#!/bin/bash <- works

Not sure if this is exactly a bug or not, thanks for your time.

Kitty

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 21 Oct 2014 07:12:51 PM UTCbensOpen/ClosedOpen=>Closed
    Sun 21 Sep 2014 03:34:21 PM UTCbensStatusNone=>Fixed
      Assigned toNone=>bens
      SummaryNano doesn\'t understand #!/usr/bin/env bash for syntax highlighting in some cases=>Nano doesn't understand #!/usr/bin/env bash for syntax highlighting

    Back to the top


    Powered by Savane 3.1-cleanup1