scopatz / nanorc

Improved Nano Syntax Highlighting Files
Other
3k stars 549 forks source link

Command "comment" not understood #238

Open okainov opened 5 years ago

okainov commented 5 years ago

$ nano /var/www/html/index.html

Error in /users/<>/.nano/html.nanorc on line 5: Command "comment" not understood

Error in /users/<>/.nano/html.j2.nanorc on line 5: Command "comment" not understood

Press Enter to continue starting nano.

$ nano -V
 GNU nano, version 2.5.3
 (C) 1999..2016 Free Software Foundation, Inc.
 Email: nano@nano-editor.org    Web: http://www.nano-editor.org/
 Compiled options: --disable-libmagic --disable-wrapping-as-root --enable-utf8
$ lsb_release -a
LSB Version:    core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.6 LTS
Release:        16.04
Codename:       xenial
SuperSandro2000 commented 5 years ago

Did you try updating to a more recent nano/ubuntu version?

okainov commented 5 years ago

Yes, rebuilding nano and updating to 2.9.3 helped. But this doesn't change the fact that issue is here :)

SuperSandro2000 commented 5 years ago

Well... I don't think this project can be compatible with all nano versions especially if the syntax changed in a not so recent version. You are free to contribute a PR to fix it.

pkiula commented 4 years ago

A fresh install of CentOS 7.6 comes with a certain version of Nano. Your script is pointless if it doesn't work with that. These are widely used OSes. Anyway, thanks.

SuperSandro2000 commented 4 years ago

@pkiula I am pretty sure he uses Ubuntu.

Then update it your old nano or contribute a fix to make the rc files work on old and new nanos. I think if you write such comments it is rather pointless and does not contribute to this project in any way.

BTW I already have seen a lot of Linux machines and not a single one of them used CentOS. Mache it isn't as widely used as you think.