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

Generating .nanorc on-fly #30

Open
Piterden opened this issue Jan 14, 2017 · 1 comment
Open

Generating .nanorc on-fly #30

Piterden opened this issue Jan 14, 2017 · 1 comment

Comments

@Piterden
Copy link
Contributor

Piterden commented Jan 14, 2017

Hi!

I exactly don't know, where to put this, because this code part is for .bashrc.

# Generating correct `.nanorc` file.
# You should to set right path starts from $HOME, ends with slash.  
# Also it needs blank (or not) ~/.nanorc file
nano_highlight_path="projects/nano-highlight/"
if [ -f "$HOME"/.nanorc ]; then
    > "$HOME"/.nanorc
    for syntax in $(ls $HOME/$nano_highlight_path*.nanorc); do
        echo "include \"$syntax\"" >> "$HOME"/.nanorc
    done
fi

I hope this will be useful to someone.

@serialhex
Copy link
Owner

Hmm.... Are you using this to generate a new .nanorc file with all of the syntaxes for a given user? That's what it looks like it's doing (I don't have a linux pc to test with atm). If that's not it what is the purpose of the code? If I'm right just make it a shell script called gen-nanorc.sh or something and make a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants