Jump to content
StevenOliver

Nano and Aliases and bashrc and nanorc

Recommended Posts

Posted (edited)

Question: Is it safe to delete nanorc (located in /etc/)?

Reason: I don't like Nano's default syntax highlighting. Deleting "nanorc" appears to fix this (makes everything old-style black-and-white).

Background info: I discovered -Ynone disables syntax highlighting (example: "nano -Ynone myfile.php"), so I created an alias.

Problem: When accessing Ubuntu via my Mac Terminal, Bash does not read the .bashrc file where aliases are written (discussed extensively on 'SO'..... something about if my terminal emulator is a login shell, and that the "Source .bashrc" command has to be run at each login to 'activate' the .bashrc file.... something like that).

Bad Solution: Deleting the "nanorc" file located in /etc seemed to get rid of all the undesired syntax highlighting for me. Is this "bad?" Will this be bad for the rest of the system? Will some daemon or process be constantly "looking for" the missing nanorc file? And, is there a better solution?

Thank you

Edited by StevenOliver

Share this post


Link to post
Share on other sites

If you don't like the default highlighting, have you looked into better highlighting?

Share this post


Link to post
Share on other sites

Hi Requinix (oops I almost typed "high requinix" freudian slip hahahah), but no, I don't want any syntax highlighting at all. Syntax is for the newbie millenials..... My question was just about "will problems be caused by deleting nanorc"  :-)

Back in 1999, I used to use Pico, but I'm afraid to install Pico, because the website that has the repository has security seal error.... makes me nervous.

Share this post


Link to post
Share on other sites
3 hours ago, StevenOliver said:

Syntax is for the newbie millenials.....

I sure hope that was a joke.

 

3 hours ago, StevenOliver said:

My question was just about "will problems be caused by deleting nanorc"  🙂

No, but if you want to trim your fingernails then nail clippers will be a better choice than a cleaver.

Share this post


Link to post
Share on other sites
Posted (edited)

Requinix, as usual, your words are indeed wise, usually not what many want to hear, but usually the best-ever advice. Many questions are basically the same: "I botched my code, I don't want to fix it, what's the hack to work around the botch?" At least, that was my question :-) I have figured out the correct answer. There was a server misconfiguration whereby User was not linked to .bashr. Figuring out the fix was beyond my knowledge, but deleting some system software made it look like it works again (akin to, "My car is running rough, I yanked a handfull of wires out of my engine, now my car runs smooth").

The correct fix (for me, as best I can do), was deleting and reinstalling the User. Now, .bashrc works, and I created an alias "nano=nano -Ynone" so now I have the desired result and everything is in the lovely black and white, and I don't have any software missing.

Regarding "Syntax is for the newbie millenials," yes, tongue-in-cheek indeed. That being said, I HATE a bunch of colored bs in my terminal.... big...stupid...colors. I'll leave it at "Syntax Highlighting is for the newbie millenials." 😁

Edited by StevenOliver

Share this post


Link to post
Share on other sites
Posted (edited)

Syntax highlighting isn't to make it look pretty - it's a debugging aid.

See this thread (particlarly the opening post)...

 

Edited by Barand

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.