GNU nano - Bugs: bug #42094, filename regex for man pages is...
You are not allowed to post comments on this tracker with your current authentication level.
bug #42094: filename regex for man pages is very broad
Submitter: | Benno Schulenberg <bens> | ||
Submitted: | Thu 10 Apr 2014 08:45:17 PM UTC | ||
Severity: | 3 - Normal | Status: | Wont Fix |
Assigned to: | None | Open/Closed: | Closed |
Sat 21 Jun 2014 11:14:57 AM UTC, comment #3: |
Benno Schulenberg <bens> |
Fri 16 May 2014 10:15:30 AM UTC, comment #2: It works the other way around: the filename regex that is defined last gets matched first. I still use explicit includes, and moving the 'include man.nanorc' to before the 'include changelog.nanorc' makes all ChangeLog.* files be coloured properly.
|
Benno Schulenberg <bens> |
Fri 16 May 2014 09:09:58 AM UTC, comment #1: What happens is that ChangeLog.1 matches the filename regex for man pages, and thus gets coloured as a man page. It's just that there is nothing in a changelog that matches manpage commands, so there are no telltale signs.
|
Benno Schulenberg <bens> |
Thu 10 Apr 2014 08:45:17 PM UTC, original submission:
When in changelog.nanorc I change the line
to
it does not work as expected: it does not match for example the file Changelog.1 It does match Changelog.a or Changelog.21 or Changelog.a1, but not any changelog that ends with a period plus a single digit. Is this a fault in regular expressions on my system? Or a mistake on nano's part? |
Benno Schulenberg <bens> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2015-04-02 | bens | Status | Need Info | Wont Fix | |
Open/Closed | Open | Closed | |||
Summary | Filename regex for man pages is very broad | filename regex for man pages is very broad | |||
2014-06-21 | bens | Status | None | Need Info | |
2014-05-16 | bens | Summary | Filename regex in syntax is not properly matched | Filename regex for man pages is very broad |
Powered by Savane 3.13-758e.
Corresponding source code
Can't think of any way to avoid this, apart from requiring that the word "man" occurs somewhere in the path:
syntax "man" "man.*\.[1-9]x?$"
But that will prevent all files that are edited in the current directory from being recognized as a man page by this regex. However, when libmagic has not been disabled, it will still work in most cases. So... is the above acceptable?