Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge PR #417 from 'scopatz/nanorc' #6

Merged
merged 5 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,34 @@ if [ ! "$(command -v unzip)" ]; then
exit 1
fi


_fetch_sources(){
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip
mkdir -p ~/.nano/
mkdir -p ~/.config/nano/

cd ~/.nano/ || exit
cd ~/.config/nano/ || exit
unzip -o "/tmp/nanorc.zip"
mv nanorc-master/* ./
rm -rf nanorc-master
rm /tmp/nanorc.zip
}

_update_nanorc(){
touch ~/.nanorc
touch ~/.config/nano/nanorc

# add all includes from ~/.nano/nanorc if they're not already there
# add all includes from ~/.config/nano/nanorc if they're not already there
while read -r inc; do
if ! grep -q "$inc" "${NANORC_FILE}"; then
echo "$inc" >> "$NANORC_FILE"
fi
done < ~/.nano/nanorc
done < ~/.config/nano/nanorc
}

_update_nanorc_lite(){
sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.nano\/*.nanorc"' "${NANORC_FILE}"
sed -i '/include "\/usr\/share\/nano\/\*\.nanorc"/i include "~\/.conig.\/nano\/*.nanorc"' "${NANORC_FILE}"
}

NANORC_FILE=~/.nanorc
NANORC_FILE=~/.config\/nano\/nanorc

case "$1" in
-l|--lite)
Expand Down
180 changes: 90 additions & 90 deletions nanorc
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
include "~/.nano/apacheconf.nanorc"
include "~/.nano/arduino.nanorc"
include "~/.nano/asciidoc.nanorc"
include "~/.nano/asm.nanorc"
include "~/.nano/awk.nanorc"
include "~/.nano/c.nanorc"
include "~/.nano/clojure.nanorc"
include "~/.nano/cmake.nanorc"
include "~/.nano/coffeescript.nanorc"
include "~/.nano/colortest.nanorc"
include "~/.nano/conf.nanorc"
include "~/.nano/csharp.nanorc"
include "~/.nano/css.nanorc"
include "~/.nano/cython.nanorc"
include "~/.nano/dot.nanorc"
include "~/.nano/dotenv.nanorc"
include "~/.nano/email.nanorc"
include "~/.nano/Dockerfile.nanorc"
include "~/.nano/etc-hosts.nanorc"
include "~/.nano/fish.nanorc"
include "~/.nano/fortran.nanorc"
include "~/.nano/gentoo.nanorc"
include "~/.nano/git.nanorc"
include "~/.nano/gitcommit.nanorc"
include "~/.nano/glsl.nanorc"
include "~/.nano/go.nanorc"
include "~/.nano/gradle.nanorc"
include "~/.nano/groff.nanorc"
include "~/.nano/haml.nanorc"
include "~/.nano/haskell.nanorc"
include "~/.nano/html.nanorc"
include "~/.nano/html.j2.nanorc"
include "~/.nano/ical.nanorc"
include "~/.nano/ini.nanorc"
include "~/.nano/inputrc.nanorc"
include "~/.nano/jade.nanorc"
include "~/.nano/java.nanorc"
include "~/.nano/javascript.nanorc"
include "~/.nano/js.nanorc"
include "~/.nano/json.nanorc"
include "~/.nano/keymap.nanorc"
include "~/.nano/kickstart.nanorc"
include "~/.nano/kotlin.nanorc"
include "~/.nano/ledger.nanorc"
include "~/.nano/lisp.nanorc"
include "~/.nano/lua.nanorc"
include "~/.nano/makefile.nanorc"
include "~/.nano/man.nanorc"
include "~/.nano/markdown.nanorc"
include "~/.nano/mpdconf.nanorc"
include "~/.nano/mutt.nanorc"
include "~/.nano/nanorc.nanorc"
include "~/.nano/nginx.nanorc"
include "~/.nano/nmap.nanorc"
include "~/.nano/ocaml.nanorc"
include "~/.nano/patch.nanorc"
include "~/.nano/peg.nanorc"
include "~/.nano/perl.nanorc"
include "~/.nano/perl6.nanorc"
include "~/.nano/php.nanorc"
include "~/.nano/pkg-config.nanorc"
include "~/.nano/pkgbuild.nanorc"
include "~/.nano/po.nanorc"
include "~/.nano/pov.nanorc"
include "~/.nano/privoxy.nanorc"
include "~/.nano/puppet.nanorc"
include "~/.nano/pug.nanorc"
include "~/.nano/python.nanorc"
include "~/.nano/reST.nanorc"
include "~/.nano/rpmspec.nanorc"
include "~/.nano/ruby.nanorc"
include "~/.nano/rust.nanorc"
include "~/.nano/scala.nanorc"
include "~/.nano/sed.nanorc"
include "~/.nano/sh.nanorc"
include "~/.nano/sls.nanorc"
include "~/.nano/sql.nanorc"
include "~/.nano/svn.nanorc"
include "~/.nano/swift.nanorc"
include "~/.nano/systemd.nanorc"
include "~/.nano/tcl.nanorc"
include "~/.nano/tex.nanorc"
include "~/.nano/vala.nanorc"
include "~/.nano/verilog.nanorc"
include "~/.nano/vi.nanorc"
include "~/.nano/xml.nanorc"
include "~/.nano/xresources.nanorc"
include "~/.nano/yaml.nanorc"
include "~/.nano/yum.nanorc"
include "~/.nano/zsh.nanorc"
include "~/.config/nano/apacheconf.nanorc"
include "~/.config/nano/arduino.nanorc"
include "~/.config/nano/asciidoc.nanorc"
include "~/.config/nano/asm.nanorc"
include "~/.config/nano/awk.nanorc"
include "~/.config/nano/c.nanorc"
include "~/.config/nano/clojure.nanorc"
include "~/.config/nano/cmake.nanorc"
include "~/.config/nano/coffeescript.nanorc"
include "~/.config/nano/colortest.nanorc"
include "~/.config/nano/conf.nanorc"
include "~/.config/nano/csharp.nanorc"
include "~/.config/nano/css.nanorc"
include "~/.config/nano/cython.nanorc"
include "~/.config/nano/dot.nanorc"
include "~/.config/nano/dotenv.nanorc"
include "~/.config/nano/email.nanorc"
include "~/.config/nano/Dockerfile.nanorc"
include "~/.config/nano/etc-hosts.nanorc"
include "~/.config/nano/fish.nanorc"
include "~/.config/nano/fortran.nanorc"
include "~/.config/nano/gentoo.nanorc"
include "~/.config/nano/git.nanorc"
include "~/.config/nano/gitcommit.nanorc"
include "~/.config/nano/glsl.nanorc"
include "~/.config/nano/go.nanorc"
include "~/.config/nano/gradle.nanorc"
include "~/.config/nano/groff.nanorc"
include "~/.config/nano/haml.nanorc"
include "~/.config/nano/haskell.nanorc"
include "~/.config/nano/html.nanorc"
include "~/.config/nano/html.j2.nanorc"
include "~/.config/nano/ical.nanorc"
include "~/.config/nano/ini.nanorc"
include "~/.config/nano/inputrc.nanorc"
include "~/.config/nano/jade.nanorc"
include "~/.config/nano/java.nanorc"
include "~/.config/nano/javascript.nanorc"
include "~/.config/nano/js.nanorc"
include "~/.config/nano/json.nanorc"
include "~/.config/nano/keymap.nanorc"
include "~/.config/nano/kickstart.nanorc"
include "~/.config/nano/kotlin.nanorc"
include "~/.config/nano/ledger.nanorc"
include "~/.config/nano/lisp.nanorc"
include "~/.config/nano/lua.nanorc"
include "~/.config/nano/makefile.nanorc"
include "~/.config/nano/man.nanorc"
include "~/.config/nano/markdown.nanorc"
include "~/.config/nano/mpdconf.nanorc"
include "~/.config/nano/mutt.nanorc"
include "~/.config/nano/nanorc.nanorc"
include "~/.config/nano/nginx.nanorc"
include "~/.config/nano/nmap.nanorc"
include "~/.config/nano/ocaml.nanorc"
include "~/.config/nano/patch.nanorc"
include "~/.config/nano/peg.nanorc"
include "~/.config/nano/perl.nanorc"
include "~/.config/nano/perl6.nanorc"
include "~/.config/nano/php.nanorc"
include "~/.config/nano/pkg-config.nanorc"
include "~/.config/nano/pkgbuild.nanorc"
include "~/.config/nano/po.nanorc"
include "~/.config/nano/pov.nanorc"
include "~/.config/nano/privoxy.nanorc"
include "~/.config/nano/puppet.nanorc"
include "~/.config/nano/pug.nanorc"
include "~/.config/nano/python.nanorc"
include "~/.config/nano/reST.nanorc"
include "~/.config/nano/rpmspec.nanorc"
include "~/.config/nano/ruby.nanorc"
include "~/.config/nano/rust.nanorc"
include "~/.config/nano/scala.nanorc"
include "~/.config/nano/sed.nanorc"
include "~/.config/nano/sh.nanorc"
include "~/.config/nano/sls.nanorc"
include "~/.config/nano/sql.nanorc"
include "~/.config/nano/svn.nanorc"
include "~/.config/nano/swift.nanorc"
include "~/.config/nano/systemd.nanorc"
include "~/.config/nano/tcl.nanorc"
include "~/.config/nano/tex.nanorc"
include "~/.config/nano/vala.nanorc"
include "~/.config/nano/verilog.nanorc"
include "~/.config/nano/vi.nanorc"
include "~/.config/nano/xml.nanorc"
include "~/.config/nano/xresources.nanorc"
include "~/.config/nano/yaml.nanorc"
include "~/.config/nano/yum.nanorc"
include "~/.config/nano/zsh.nanorc"
1 change: 0 additions & 1 deletion nanorc.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ icolor brightblue " brightblue"
icolor brightmagenta " brightmagenta"
icolor brightcyan " brightcyan"
icolor brightwhite " brightwhite"
icolor brightnormal " brightnormal"
icolor ,black ",black "
icolor ,red ",red "
icolor ,green ",green "
Expand Down