scopatz / nanorc

Improved Nano Syntax Highlighting Files
Other
3.06k stars 555 forks source link

Command "header" not understood #49

Open natejgardner opened 9 years ago

natejgardner commented 9 years ago

After following the installation instructions, there are several errors when running nano:

awk.nanorc line 2: command "header" not understood coffeescript.nanorc line 2: command "header" not understood ini.nanorc line 2: command "header" not understood json.nanorc line 2: command "header" not understood makefile.nanorc line 2: command "header" not understood nginx.nanorc line 2: command "header" not understood perl.nanorc line 4: command "header" not understood python.nanorc line 4: command "header" not understood ruby.nanorc line 4: command "header" not understood sed.nanorc line 2: command "header" not understood sh.nanorc line 4: command "header" not understood sh. nanorc line 11: bad regex "^\s+?[0-9A-Z]++?()": repetition-operator operand invalid systemd.nanorc line 2: command "header" not understood tcl.nanorc: line 2: command "header" not understood yaml.nanorc line 2: command "header" not understood zsh.nanorc line 2: bad regex ".?zsh[^.]+?$": repetition-operator operand invalid zsh.nanorc line 3: command "header" not understood zsh.nanorc line 23: bad regex "^\s+?(function\s+)?[0-9A-Z]+\s+?()": repetition-operator operand invalid

natejgardner commented 9 years ago

Additionally, occasionally I get a segfault when trying to edit something now.

scopatz commented 9 years ago

Hey @natejgardner sorry to hear that you are having troubles. what version of nano are you on?

natejgardner commented 9 years ago

I'm using Nano 2.0.6.

scopatz commented 9 years ago

Ahh Ok. I think this header stuff only works on v2.2. I am on 2.2.6

natejgardner commented 9 years ago

Would that also explain the regex errors?

scopatz commented 9 years ago

Yeah this explains those too.

On Thu, Jan 29, 2015, 2:19 PM Nate Gardner notifications@github.com wrote:

Would that also explain the regex errors?

— Reply to this email directly or view it on GitHub https://github.com/scopatz/nanorc/issues/49#issuecomment-72096594.

natejgardner commented 9 years ago

I tried running nano 2.3.6 and still get the following errors:

Error in ~/.nano/sh.nanorc on line 11: Bad regex "^\s+?[0-9A-Z_]+\s+?()": repetition-operator operand invalid

Error in ~/.nano/zsh.nanorc on line 2: Bad regex ".?zsh[^.]+?$": repetition-operator operand invalid

Error in ~/.nano/zsh.nanorc on line 23: Bad regex "^\s+?(function\s+)?[0-9A-Z_]+\s+?()": repetition-operator operand invalid

scopatz commented 9 years ago

Weird. OK. Well if you come up with a fix I'd gladly accept them...

martenson commented 9 years ago

I get these three header errors on 2.2.6. I just removed the lines as I don't use these often.

ddarbyson commented 9 years ago

@natejgardner I get exactly the same errors using nano GNU nano version 2.2.6

kourindouhime commented 8 years ago

installed nano from homebrew – no header errors any more

ngryman commented 8 years ago

Having the same with GNU nano version 2.0.6.

leolelego commented 8 years ago

fixed with Homebrew in 1min header only work with nano > 2.2 :

brew tap homebrew/dupes
brew install nano
tb582 commented 8 years ago

I continue to see this issue

...nanorc on line 2: Command "header" not understood
Press Enter to continue starting nano.
Segmentation fault: 11
oizulain commented 7 years ago

The solution by @leoderbois worked for me, but in case someone is struggling, remember to close and reopen the terminal after updating nano ;)

scopatz commented 7 years ago

Pull requests welcome!

deltarod commented 7 years ago

I just got this problem, is the header tag even important?

crimsoncoast commented 7 years ago

I also encountered the numerous errors and occasional segfault; what worked for me was removing the .nanorc file. Disclaimer: this results in no syntax highlighting but at least you can use nano without segfaults or 13 error messages.