StevenOliver Posted June 23, 2020 Share Posted June 23, 2020 (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 June 23, 2020 by StevenOliver Quote Link to comment https://forums.phpfreaks.com/topic/310978-nano-and-aliases-and-bashrc-and-nanorc/ Share on other sites More sharing options...
requinix Posted June 23, 2020 Share Posted June 23, 2020 If you don't like the default highlighting, have you looked into better highlighting? Quote Link to comment https://forums.phpfreaks.com/topic/310978-nano-and-aliases-and-bashrc-and-nanorc/#findComment-1579077 Share on other sites More sharing options...
StevenOliver Posted June 23, 2020 Author Share Posted June 23, 2020 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. Quote Link to comment https://forums.phpfreaks.com/topic/310978-nano-and-aliases-and-bashrc-and-nanorc/#findComment-1579091 Share on other sites More sharing options...
requinix Posted June 23, 2020 Share Posted June 23, 2020 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. Quote Link to comment https://forums.phpfreaks.com/topic/310978-nano-and-aliases-and-bashrc-and-nanorc/#findComment-1579095 Share on other sites More sharing options...
StevenOliver Posted June 25, 2020 Author Share Posted June 25, 2020 (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 June 25, 2020 by StevenOliver Quote Link to comment https://forums.phpfreaks.com/topic/310978-nano-and-aliases-and-bashrc-and-nanorc/#findComment-1579159 Share on other sites More sharing options...
Barand Posted June 25, 2020 Share Posted June 25, 2020 (edited) Syntax highlighting isn't to make it look pretty - it's a debugging aid. See this thread (particlarly the opening post)... Edited June 25, 2020 by Barand Quote Link to comment https://forums.phpfreaks.com/topic/310978-nano-and-aliases-and-bashrc-and-nanorc/#findComment-1579174 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.