Skip to content

Generating .nanorc on-fly #30

@Piterden

Description

@Piterden

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions