Skip to content

Instantly share code, notes, and snippets.

@matutter
Last active March 30, 2017 14:08
Show Gist options
  • Select an option

  • Save matutter/8b3f811d8695dcb9ca7213848857ae47 to your computer and use it in GitHub Desktop.

Select an option

Save matutter/8b3f811d8695dcb9ca7213848857ae47 to your computer and use it in GitHub Desktop.
Includes all .nanorc files from /usr/share/nano
#!/bin/bash
# include all .nanorc files from /usr/share/nano
NANORC=~/.nanorc
SOURCE=/usr/share/nano
echo "# from nanomake.sh" > ${NANORC}
echo "set tabsize 2" >> ${NANORC}
echo "set tabstospaces" >> ${NANORC}
ls ${SOURCE} | grep .nanorc | while read FILE; do
echo "include ${SOURCE}/${FILE}" >> ${NANORC}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment