Skip to content

Instantly share code, notes, and snippets.

@aamnah
Forked from BlakeGardner/install nano.sh
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aamnah/6c62ab2180539de7c011 to your computer and use it in GitHub Desktop.
Save aamnah/6c62ab2180539de7c011 to your computer and use it in GitHub Desktop.
# install Homebrew if you don't already have it: http://mxcl.github.io/homebrew/
# On Mac, Homebrew with homebrew-dupes will allow you to easily upgrade nano to a newer version than the one that came with Mac OSX.
# [homebrew-dupes](https://github.com/Homebrew/homebrew-dupes):
# These formulae duplicate software provided by OS X, though may provide more recent or bugfix versions.
# Add the dupes formulae, then install a new version of nano.
brew tap homebrew/dupes
brew install nano
# Installing this way includes the /usr/local/share/nano folder containing the default syntax highlight files.
# Use the following run-once one-liner command to add all languages to ~/.nanorc.
/bin/ls /usr/local/share/nano/*.nanorc | xargs -I {} echo 'include "{}"' >> ~/.nanorc
# re-open your terminal and you'll have syntax highlighting
# If it doesn't work and gives errors about magic, you need to set the local path.
# Add the following to your "~/.bash_profile".
# export PATH=/usr/local/bin:$PATH
brew tap homebrew/dupes && brew install nano
/bin/ls /usr/local/share/nano/*.nanorc | xargs -I {} echo 'include "{}"' >> ~/.nanorc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment