1
0
mirror of https://github.com/scopatz/nanorc synced 2024-09-29 01:19:50 +02:00

Merge pull request #224 from esler/patch-1

fix highlighting for v2.9.*
This commit is contained in:
Anthony Scopatz 2019-07-23 11:06:29 -04:00 committed by GitHub
commit cff2b750e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 9 deletions

View File

@ -13,15 +13,15 @@ These should be placed inside of the ``~/.nano/`` directory.
Or for system-wide installation ``/usr/share/nano-syntax-highlighting/``. Or for system-wide installation ``/usr/share/nano-syntax-highlighting/``.
In other words:: In other words::
git clone git@github.com:scopatz/nanorc.git ~/.nano git clone --single-branch --branch=v2.9 git@github.com:scopatz/nanorc.git ~/.nano
*Note - if you have any issues (ssh was not properly configured), alternatively use:: *Note - if you have any issues (ssh was not properly configured), alternatively use::
git clone https://github.com/scopatz/nanorc.git ~/.nano git clone --single-branch --branch=v2.9 https://github.com/scopatz/nanorc.git ~/.nano
*System wide will look like so*:: *System wide will look like so*::
sudo git clone https://github.com/scopatz/nanorc.git /usr/share/nano-syntax-highlighting/ sudo git clone --single-branch --branch=v2.9 https://github.com/scopatz/nanorc.git /usr/share/nano-syntax-highlighting/
**NOTE**: \< and \> are regular character escapes on macOS. The bug's fixed in Nano, but this might be a problem **NOTE**: \< and \> are regular character escapes on macOS. The bug's fixed in Nano, but this might be a problem
if you are using an older version. If this is the case, replace them respectively with [[:<:]] and [[:>:]]. if you are using an older version. If this is the case, replace them respectively with [[:<:]] and [[:>:]].
@ -54,11 +54,11 @@ where ``$install_path`` is ``/usr/share/nano-syntax-highlighting`` or ``~/.nano/
~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
Finally, you can run an automatic installer using the following code:: Finally, you can run an automatic installer using the following code::
$ curl https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh | sh $ curl https://raw.githubusercontent.com/scopatz/nanorc/v2.9/install.sh | sh
or alternatively:: or alternatively::
$ wget https://raw.githubusercontent.com/scopatz/nanorc/master/install.sh -O- | sh $ wget https://raw.githubusercontent.com/scopatz/nanorc/v2.9/install.sh -O- | sh
*Note - *Note -
some syntax definitions which exist in Nano upstream may be preferable to the ones provided by this package. some syntax definitions which exist in Nano upstream may be preferable to the ones provided by this package.

View File

@ -8,7 +8,7 @@ color yellow "^[0-9\.]+\s"
icolor green "^[0-9a-f:]+\s" icolor green "^[0-9a-f:]+\s"
# interpunction # interpunction
color normal "[.:]" color white "[.:]"
# comments # comments
color brightblack "^#.*" color brightblack "^#.*"

View File

@ -7,13 +7,13 @@ if [ ! "$(command -v unzip)" ]; then
fi fi
_fetch_sources(){ _fetch_sources(){
wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/master.zip wget -O /tmp/nanorc.zip https://github.com/scopatz/nanorc/archive/v2.9.zip
mkdir -p ~/.nano/ mkdir -p ~/.nano/
cd ~/.nano/ || exit cd ~/.nano/ || exit
unzip -o "/tmp/nanorc.zip" unzip -o "/tmp/nanorc.zip"
mv nanorc-master/* ./ mv nanorc-v2.9/* ./
rm -rf nanorc-master rm -rf nanorc-v2.9
rm /tmp/nanorc.zip rm /tmp/nanorc.zip
} }