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

Add branches for different nano versions #370

Closed
wants to merge 7 commits into from
Closed

Conversation

rasa
Copy link
Contributor

@rasa rasa commented Jun 6, 2021

This PR provides create-branches.sh, which creates the following branches:

  1. pre-5.0: changed latte to brightred and purple to brightmagenta.
  2. pre-4.5: commented out tabgives
  3. pre-2.9.5: changed normal to white, and brightnormal to brightwhite.
  4. pre-2.5.3: commented out comment
  5. pre-2.3.2: commented out linter
  6. pre-2.2.99: commented out magic
  7. pre-2.1.5: commented out header, fix regex failures, add quotes around syntax names, and comment out long string causing out of memory error in powershell.nanorc.

Providing these branches closes #49 #104 #164 #174 #186 #189 #191 #227 #229 #236 #238 #242 #335 #349 .

Note that the existing v2.9 branch is significantly out of date with master per v2.9...master. Also, the name v2.9 doesn't really apply to more recent versions of nano.

The pre-2.1.5 branch works on MacOS, which has nano version 2.0.6:

$ /usr/bin/nano --version
 GNU nano version 2.0.6 (compiled 17:24:29, Jun  5 2020)
 Email: [email protected]    Web: http://www.nano-editor.org/
 Compiled options: --disable-nls --enable-color --enable-extra --enable-multibuffer --enable-nanorc --enable-utf8

If this PR is accepted, I will submit a PR to update readme.md with a note to use these new branches. I will also update install.sh to use the logic in switch-branch.sh to automatically select the correct branch.

davidhcefx pushed a commit to davidhcefx/nanorc that referenced this pull request Feb 3, 2024
davidhcefx pushed a commit to davidhcefx/nanorc that referenced this pull request Apr 6, 2024
davidhcefx pushed a commit to davidhcefx/nanorc that referenced this pull request Apr 6, 2024
Copy link
Contributor

@davidhcefx davidhcefx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found several issues when trying to apply to Nano version 2.5.3. I am currently working on solving these issues, and when it's done it should appear at galenguyer#15.

pre-2.5.3
pre-2.3.2
pre-2.2.99
pre-2.1.5
Copy link
Contributor

@davidhcefx davidhcefx Apr 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These doesn't seem correct.
The 'comment' feature is introduced in 2.6.0, where 2.5.3 is its previous version.
Same apply for the 'linter', 'magic' and 'header'

git commit -am "fix: pre-5.0: change 'brightred' to 'brightmagenta'"

sed -E -i.bak -e 's/\bcolor\s+latte\b/color brightred/' "${nanos[@]}"
git commit -am "fix: pre-5.0: change 'latte' to 'brightred'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. The \bcolor regex rule does not handle the case for icolor.
  2. latte could appear in either foreground color or background color. This rule doesn't handle the background case.

git commit -am "fix: pre-2.1.5: comment out 'header'"

sed -E -i.bak -e 's/^(\s*syntax\s+)([^"\s]+)(\s.*)/\1"\2"\3/' "${nanos[@]}"
git commit -am "fix: pre-2.1.5: add quotes around syntax names"
Copy link
Contributor

@davidhcefx davidhcefx Apr 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beware that the whitespace group \s will NOT take effect when it's in [\s].

@rasa
Copy link
Contributor Author

rasa commented Apr 15, 2024

Superseded by galenguyer#27

@rasa rasa closed this Apr 15, 2024
@davidhcefx davidhcefx mentioned this pull request May 16, 2024
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

Successfully merging this pull request may close these issues.

Command "header" not understood
2 participants