diff -Nru nano-7.2/debian/changelog nano-7.2/debian/changelog --- nano-7.2/debian/changelog 2024-04-08 16:13:58.000000000 +0000 +++ nano-7.2/debian/changelog 2024-04-14 13:35:55.000000000 +0000 @@ -1,3 +1,9 @@ +nano (7.2-3) noble; urgency=medium + + * More syntax highlighting. + + -- Simon Arons Sun, 14 Apr 2024 15:35:55 +0200 + nano (7.2-2build1) noble; urgency=high * No change rebuild for 64-bit time_t and frame pointers. diff -Nru nano-7.2/debian/nanorc nano-7.2/debian/nanorc --- nano-7.2/debian/nanorc 2023-05-23 12:56:42.000000000 +0000 +++ nano-7.2/debian/nanorc 2024-04-14 13:33:28.000000000 +0000 @@ -157,10 +157,10 @@ ## will jump to that beginning (either forwards or backwards). If the ## cursor is already at that position, it will jump to the true start ## of the line (the left edge). -# set smarthome +set smarthome ## Spread overlong lines over multiple screen lines. -# set softwrap +set softwrap ## Use this spelling checker instead of the internal one. This option ## does not have a default value. @@ -209,17 +209,17 @@ ## Paint the interface elements of nano. These are examples; there are ## no colors by default, except for errorcolor and spotlightcolor. -# set titlecolor bold,white,blue +set titlecolor brightwhite,blue +set statuscolor brightwhite,cyan +set errorcolor brightwhite,red +set selectedcolor brightwhite,magenta +set numbercolor cyan +set keycolor cyan +set functioncolor white # set promptcolor lightwhite,grey -# set statuscolor bold,white,green -# set errorcolor bold,white,red # set spotlightcolor black,lightyellow -# set selectedcolor lightwhite,magenta # set stripecolor ,yellow # set scrollercolor cyan -# set numbercolor cyan -# set keycolor cyan -# set functioncolor green ## In root's .nanorc you might want to use: # set titlecolor bold,white,magenta @@ -313,6 +313,9 @@ #bind ^B wherewas all #bind ^D findprevious all #bind ^R replace main +#bind ^Z undo main +#bind ^Y redo main +#unbind ^K main #unbind ^U all #unbind ^N main #unbind ^Y all @@ -325,7 +328,9 @@ #bind ^T cutrestoffile execute #bind ^L linter execute #bind ^E execute main -#bind ^K "{mark}{end}{zap}" main -#bind ^U "{mark}{home}{zap}" main -#bind ^Z undo main -#bind ^Y redo main +bind ^P softwrap all +bind ^L linenumbers all +bind M-( lastline all +bind M-/ firstline all +bind F3 findnext all +bind F4 findprevious all diff -Nru nano-7.2/debian/patches/000more-syntax-highlighting.patch nano-7.2/debian/patches/000more-syntax-highlighting.patch --- nano-7.2/debian/patches/000more-syntax-highlighting.patch 1970-01-01 00:00:00.000000000 +0000 +++ nano-7.2/debian/patches/000more-syntax-highlighting.patch 2023-02-27 09:24:33.000000000 +0000 @@ -0,0 +1,845 @@ +Index: nano-7.2/syntax/Dockerfile.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/Dockerfile.nanorc +@@ -0,0 +1,26 @@ ++## Syntax highlighting for Dockerfiles ++syntax "Dockerfile" "Dockerfile[^/]*$" "\.dockerfile$" ++ ++## Keywords ++icolor red "^(FROM|RUN|CMD|LABEL|MAINTAINER|EXPOSE|ENV|ADD|COPY|ENTRYPOINT|VOLUME|USER|WORKDIR|ARG|ONBUILD|STOPSIGNAL|HEALTHCHECK|SHELL)[[:space:]]" ++ ++## Brackets & parenthesis ++color brightgreen "(\(|\)|\[|\])" ++ ++## Double ampersand ++color brightmagenta "&&" ++ ++## Comments ++icolor cyan "^[[:space:]]*#.*$" ++ ++## Blank space at EOL ++color ,green "[[:space:]]+$" ++ ++## Strings, single-quoted ++color brightwhite "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" ++ ++## Strings, double-quoted ++color brightwhite ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" ++ ++## Single and double quotes ++color brightyellow "('|\")" +Index: nano-7.2/syntax/Makefile.am +=================================================================== +--- nano-7.2.orig/syntax/Makefile.am ++++ nano-7.2/syntax/Makefile.am +@@ -1,17 +1,25 @@ +-pkgdata_DATA = asm.nanorc \ ++pkgdata_DATA = Dockerfile.nanorc \ ++ apacheconf.nanorc \ ++ asm.nanorc \ + autoconf.nanorc \ + awk.nanorc \ ++ c.nanorc \ + changelog.nanorc \ + cmake.nanorc \ +- c.nanorc \ ++ conf.nanorc \ + css.nanorc \ ++ csv.nanorc \ + default.nanorc \ ++ dotenv.nanorc \ + elisp.nanorc \ + email.nanorc \ ++ etc-hosts.nanorc \ ++ git.nanorc \ + go.nanorc \ + groff.nanorc \ + guile.nanorc \ + html.nanorc \ ++ ini.nanorc \ + java.nanorc \ + javascript.nanorc \ + json.nanorc \ +@@ -28,16 +36,22 @@ pkgdata_DATA = asm.nanorc \ + perl.nanorc \ + php.nanorc \ + po.nanorc \ ++ postgresql.nanorc \ ++ properties.nanorc \ + python.nanorc \ + ruby.nanorc \ + rust.nanorc \ ++ sed.nanorc \ + sh.nanorc \ + sql.nanorc \ ++ systemd.nanorc \ + tcl.nanorc \ + tex.nanorc \ + texinfo.nanorc \ ++ vi.nanorc \ + xml.nanorc \ +- yaml.nanorc ++ yaml.nanorc \ ++ zsh.nanorc + + nobase_pkgdata_DATA = \ + extra/ada.nanorc \ +Index: nano-7.2/syntax/Makefile.in +=================================================================== +--- nano-7.2.orig/syntax/Makefile.in ++++ nano-7.2/syntax/Makefile.in +@@ -1654,20 +1654,28 @@ target_alias = @target_alias@ + top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ +-pkgdata_DATA = asm.nanorc \ ++pkgdata_DATA = Dockerfile.nanorc \ ++ apacheconf.nanorc \ ++ asm.nanorc \ + autoconf.nanorc \ + awk.nanorc \ ++ c.nanorc \ + changelog.nanorc \ + cmake.nanorc \ +- c.nanorc \ ++ conf.nanorc \ + css.nanorc \ ++ csv.nanorc \ + default.nanorc \ ++ dotenv.nanorc \ + elisp.nanorc \ + email.nanorc \ ++ etc-hosts.nanorc \ ++ git.nanorc \ + go.nanorc \ + groff.nanorc \ + guile.nanorc \ + html.nanorc \ ++ ini.nanorc \ + java.nanorc \ + javascript.nanorc \ + json.nanorc \ +@@ -1684,16 +1692,22 @@ pkgdata_DATA = asm.nanorc \ + perl.nanorc \ + php.nanorc \ + po.nanorc \ ++ postgresql.nanorc \ ++ properties.nanorc \ + python.nanorc \ + ruby.nanorc \ + rust.nanorc \ ++ sed.nanorc \ + sh.nanorc \ + sql.nanorc \ ++ systemd.nanorc \ + tcl.nanorc \ + tex.nanorc \ + texinfo.nanorc \ ++ vi.nanorc \ + xml.nanorc \ +- yaml.nanorc ++ yaml.nanorc \ ++ zsh.nanorc + + nobase_pkgdata_DATA = \ + extra/ada.nanorc \ +Index: nano-7.2/syntax/apacheconf.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/apacheconf.nanorc +@@ -0,0 +1,48 @@ ++# Apache files ++syntax "Apacheconf" "httpd.*\.conf|mime\.types|vhosts\.d\\*|\.htaccess.*" ++ ++color white ".+" ++color brightred "(AcceptMutex|AcceptPathInfo|AccessFileName|Action|AddAlt|AddAltByEncoding|AddAltByType|AddCharset|AddDefaultCharset|AddDescription|AddEncoding)" ++color brightred "(AddHandler|AddIcon|AddIconByEncoding|AddIconByType|AddInputFilter|AddLanguage|AddModuleInfo|AddOutputFilter|AddOutputFilterByType|AddType|Alias|AliasMatch)" ++color brightred "(Allow|AllowCONNECT|AllowEncodedSlashes|AllowOverride|Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID)" ++color brightred "(Anonymous_VerifyEmail|AssignUserID|AuthAuthoritative|AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile|AuthDigestAlgorithm)" ++color brightred "(AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)" ++color brightred "(AuthGroupFile|AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases)" ++color brightred "(AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl|AuthName|AuthType|AuthUserFile)" ++color brightred "(BrowserMatch|BrowserMatchNoCase|BS2000Account|BufferedLogs|CacheDefaultExpire|CacheDirLength|CacheDirLevels|CacheDisable|CacheEnable|CacheExpiryCheck)" ++color brightred "(CacheFile|CacheForceCompletion|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheIgnoreCacheControl|CacheIgnoreHeaders)" ++color brightred "(CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire|CacheMaxFileSize|CacheMinFileSize|CacheNegotiatedDocs|CacheRoot|CacheSize|CacheTimeMargin)" ++color brightred "(CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckSpelling|ChildPerUserID|ContentDigest|CookieDomain|CookieExpires|CookieLog|CookieName)" ++color brightred "(CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultType)" ++color brightred "(DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize|Deny|Directory|DirectoryIndex|DirectoryMatch|DirectorySlash)" ++color brightred "(DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|Example|ExpiresActive|ExpiresByType)" ++color brightred "(ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FileETag|Files|FilesMatch|ForceLanguagePriority|ForceType|ForensicLog|Group|Header)" ++color brightred "(HeaderName|HostnameLookups|IdentityCheck|IfDefine|IfModule|IfVersion|ImapBase|ImapDefault|ImapMenu|Include|IndexIgnore|IndexOptions|IndexOrderDefault)" ++color brightred "(ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer|KeepAlive|KeepAliveTimeout)" ++color brightred "(LanguagePriority|LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize)" ++color brightred "(LDAPTrustedCA|LDAPTrustedCAType|Limit|LimitExcept|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine)" ++color brightred "(LimitXMLRequestBody|Listen|ListenBackLog|LoadFile|LoadModule|Location|LocationMatch|LockFile|LogFormat|LogLevel|MaxClients|MaxKeepAliveRequests)" ++color brightred "(MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MCacheMaxObjectCount|MCacheMaxObjectSize)" ++color brightred "(MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads)" ++color brightred "(MMapFile|ModMimeUsePathInfo|MultiviewsMatch|NameVirtualHost|NoProxy|NumServers|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|PassEnv|PidFile)" ++color brightred "(ProtocolEcho|Proxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyIOBufferSize|ProxyMatch|ProxyMaxForwards|ProxyPass|ProxyPassReverse)" ++color brightred "(ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia|ReadmeName|Redirect|RedirectMatch)" ++color brightred "(RedirectPermanent|RedirectTemp|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader)" ++color brightred "(Require|RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule|RLimitCPU|RLimitMEM|RLimitNPROC)" ++color brightred "(Satisfy|ScoreBoardFile|Script|ScriptAlias|ScriptAliasMatch|ScriptInterpreterSource|ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock|SecureListen)" ++color brightred "(SendBufferSize|ServerAdmin|ServerAlias|ServerLimit|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetEnv|SetEnvIf|SetEnvIfNoCase|SetHandler)" ++color brightred "(SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSLCACertificateFile|SSLCACertificatePath)" ++color brightred "(SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions)" ++color brightred "(SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite)" ++color brightred "(SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire)" ++color brightred "(SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth|StartServers|StartThreads|SuexecUserGroup|ThreadLimit)" ++color brightred "(ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnsetEnv|UseCanonicalName|User|UserDir|VirtualDocumentRoot)" ++color brightred "(VirtualDocumentRootIP|VirtualHost|VirtualScriptAlias|VirtualScriptAliasIP|Win32DisableAcceptEx|XBitHack)" ++color brightyellow "<[^>]+>" ++color white ")" ++color brightyellow "\"(\\.|[^\"])*\"" ++color brightblack "#.*" ++ ++## Trailing spaces ++color ,green "[[:space:]]+$" +Index: nano-7.2/syntax/conf.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/conf.nanorc +@@ -0,0 +1,11 @@ ++## Here is an example for nanorc files. ++## ++syntax "Conf" "\.c[o]?nf$" ++## Possible errors and parameters ++## Strings ++icolor white ""(\\.|[^"])*"" ++## Comments ++icolor brightblue "^[[:space:]]*#.*$" ++icolor cyan "^[[:space:]]*##.*$" ++## Trailing spaces ++color ,green "[[:space:]]+$" +Index: nano-7.2/syntax/csv.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/csv.nanorc +@@ -0,0 +1,16 @@ ++# Rainbow CSV highlighting rules (12 column coverage) ++# Inspired by https://github.com/mechatroner/rainbow_csv ++syntax "CSV" "\.csv$" ++ ++color brightmagenta "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?" ++color brightcyan "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?" ++color brightblue "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?" ++color brightyellow "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?" ++color brightgreen "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?" ++color brightred "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?([^,]*,?))?" ++color cyan "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?" ++color magenta "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?" ++color blue "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?([^,]*,)?" ++color yellow "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?([^,]*,)?" ++color green "^("([^"]*"")*[^"]*",?)("([^"]*"")*[^"]*",?)|^([^,]*,)?([^,]*,)?" ++color red "^("([^"]*"")*[^"]*",?)|^([^,]*,?))?" +Index: nano-7.2/syntax/dotenv.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/dotenv.nanorc +@@ -0,0 +1,10 @@ ++## Syntax highlight for .env files, eg. https://symfony.com/doc/current/components/dotenv.html ++## ++## Derived from sh.nanorc ++## ++syntax "dotenv" "\.env" "\.env\..+" ++ ++color green "(\(|\)|\$|=)" ++color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" ++color cyan "(^|[[:space:]])#.*$" ++color ,green "[[:space:]]+$" +Index: nano-7.2/syntax/etc-hosts.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/etc-hosts.nanorc +@@ -0,0 +1,15 @@ ++## Make /etc/hosts nicer to read, see `man hosts 5` to see the format ++syntax "/etc/hosts" "hosts" ++ ++# IPv4 ++color yellow "^[0-9\.]+\s" ++ ++# IPv6 ++icolor green "^[0-9a-f:]+\s" ++ ++# interpunction ++color normal "[.:]" ++ ++# comments ++color brightblack "^#.*" ++ +Index: nano-7.2/syntax/git.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/git.nanorc +@@ -0,0 +1,80 @@ ++syntax "git-config" "git(config|modules)$|\.git/config$" ++ ++color brightcyan "\<(true|false)\>" ++color cyan "^[[:space:]]*[^=]*=" ++color brightmagenta "^[[:space:]]*\[.*\]$" ++color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" ++color brightblack "(^|[[:space:]])#([^{].*)?$" ++color ,green "[[:space:]]+$" ++color ,red " +" ++ ++# This code is free software; you can redistribute it and/or modify it under ++# the terms of the new BSD License. ++# ++# Copyright (c) 2010, Sebastian Staudt ++ ++# A nano configuration file to enable syntax highlighting of some Git specific ++# files with the GNU nano text editor (http://www.nano-editor.org) ++# ++syntax "git-commit" "COMMIT_EDITMSG|TAG_EDITMSG" ++ ++# Commit message ++color yellow ".*" ++ ++# Comments ++color brightblack "^#.*" ++ ++# Files changes ++color white "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*" ++color red "#[[:space:]]deleted:" ++color green "#[[:space:]]modified:" ++color brightgreen "#[[:space:]]new file:" ++color brightblue "#[[:space:]]renamed:" ++ ++# Untracked filenames ++color black "^# [^/?*:;{}\\]+\.[^/?*:;{}\\]+$" ++ ++color brightmagenta "^#[[:space:]]Changes.*[:]" ++color brightred "^#[[:space:]]Your branch and '[^']+" ++color brightblack "^#[[:space:]]Your branch and '" ++color brightwhite "^#[[:space:]]On branch [^ ]+" ++color brightblack "^#[[:space:]]On branch" ++ ++# Recolor hash symbols ++ ++# Recolor hash symbols ++color brightblack "#" ++ ++# Trailing spaces (+LINT is not ok, git uses tabs) ++color ,green "[[:space:]]+$" ++ ++ ++# This syntax format is used for interactive rebasing ++syntax "git-rebase-todo" "git-rebase-todo" ++ ++# Default ++color yellow ".*" ++ ++# Comments ++color brightblack "^#.*" ++ ++# Rebase commands ++color green "^(e|edit) [0-9a-f]{7,40}" ++color green "^# (e, edit)" ++color brightgreen "^(f|fixup) [0-9a-f]{7,40}" ++color brightgreen "^# (f, fixup)" ++color brightwhite "^(p|pick) [0-9a-f]{7,40}" ++color brightwhite "^# (p, pick)" ++color blue "^(r|reword) [0-9a-f]{7,40}" ++color blue "^# (r, reword)" ++color brightred "^(s|squash) [0-9a-f]{7,40}" ++color brightred "^# (s, squash)" ++color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}" ++color yellow "^# (x, exec)" ++ ++# Recolor hash symbols ++color brightblack "#" ++ ++# Commit IDs ++color brightblue "[0-9a-f]{7,40}" ++ +Index: nano-7.2/syntax/ini.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/ini.nanorc +@@ -0,0 +1,11 @@ ++syntax "INI" "\.(ini|desktop|lfl|override|cfg)$" "(mimeapps\.list|pinforc|setup\.cfg)$" "weechat/.+\.conf$" ++header "^\[[A-Za-z]+\]$" ++ ++color brightcyan "\<(true|false)\>" ++color cyan "^[[:space:]]*[^=]*=" ++color brightmagenta "^[[:space:]]*\[.*\]$" ++color red "[=;]" ++color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" ++color brightblue "(^|[[:space:]])(#([^{].*)?|;.*)$" ++color ,green "[[:space:]]+$" ++color ,red " + +| + +" +Index: nano-7.2/syntax/json.nanorc +=================================================================== +--- nano-7.2.orig/syntax/json.nanorc ++++ nano-7.2/syntax/json.nanorc +@@ -1,32 +1,13 @@ +-## Syntax highlighting for JSON files. +- +-## Original author: Aapo Rantalainen +-## License: GPL version 3 or newer +- +-syntax json "\.json$" +-# No comments are permitted in JSON. ++syntax "JSON" "\.json$" ++header "^\{$" ++# You can't add a comment to JSON. + comment "" + +-# Numbers (used as value). +-color green ":[[:blank:]]*\-?(0|[1-9][0-9]*)(\.[0-9]+)?([Ee]?[-+]?[0-9]+)?" +-# Values (well, any string). +-color brightmagenta "".+"" +-# Hex numbers (used as value). +-color green ":[[:blank:]]*"#[[:xdigit:]]+"" +-# Escapes. +-color green "\\(["\/bfnrt]|u[[:xdigit:]]{4})" +-# Special words. +-color green "\<(true|false|null)\>" +- +-# Names (very unlikely to contain a quote). +-color brightblue ""[^"]+"[[:blank:]]*:" +- +-# Brackets, braces, and separators. +-color brightblue "[][]" +-color brightred "[{},:]" +- +-# Comments. +-color cyan "(^|[[:blank:]]+)(//|#).*" +- +-# Trailing whitespace. ++color brightcyan "\<[-]?[1-9][0-9]*([Ee][+-]?[0-9]+)?\>" "\<[-]?[0](\.[0-9]+)?\>" ++color cyan "\" ++color brightcyan "\<(true|false)\>" ++color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" ++color cyan "\"(\\"|[^"])*\"[[:space:]]*:" "'(\'|[^'])*'[[:space:]]*:" ++color cyan "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]" + color ,green "[[:space:]]+$" ++color ,red " + +| + +" +Index: nano-7.2/syntax/postgresql.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/postgresql.nanorc +@@ -0,0 +1,74 @@ ++## Here is an example for PostgreSQL. ++ ++syntax sql "\.sql[2345s~]?$" ++comment "-- " ++ ++# Functions. ++color white "\<[a-z_]*\(" ++ ++# Types. ++color green "\<(int2|smallint|int4|int|integer|int8|bigint|decimal|numeric|real|double precision|(small|big)?serial)\>" ++color green "\<(bit( varying)?|boolean|bytea|enum|money|tsvector|uuid)\>" ++color green "\<(char|varchar|character( varying)?|text)\>" ++color green "\<(date|interval|time(stamp)?( with time zone| without time zone)?)\>" ++color green "\<(point|line|lseg|path|box|polygon|circle)\>" ++color green "\<(cidr|inet|macaddr)\>" ++color green "\<(daterange|int4range|int8range|numrange|tsrange|tstzrange)\>" ++ ++# Structure. ++color brightyellow "\<(CASE|CLASS|DEFAULT|DO|ELSE|ELSEIF|FOR|FOREACH|FUNCTION|IF|IS NULL)\>" ++color brightyellow "\<(NEW|PRIVATE|PUBLIC|RETURN|RETURNS|SETOF|SWITCH|THEN|WHEN|WHILE)>" ++ ++# Control flow. ++color magenta "\<(EXCEPTION|NOTICE|RAISE|RETURN)\>" ++ ++# SQL keywords. ++color blue "\<(ABORT|AGGREGATE|ALTER|ANALYZE|AND|AS|AUTHORIZATION|BEGIN|CAST|CHECKPOINT|CLASS|CLOSE)\>" ++color blue "\<(CLUSTER|COLLATION|COMMENT|COMMIT|CONFIGURATION|CONSTRAINTS|CONVERSION|COPY|CREATE)\>" ++color blue "\<(DATA|DATABASE|DEALLOCATE|DECLARE|DEFAULT|DELETE|DICTIONARY|DISCARD|DO|DOMAIN|DROP)\>" ++color blue "\<(END|EVENT|EXECUTE|EXPLAIN|EXTENSION|FAMILY|FETCH|FOREIGN|FROM|FUNCTION)\>" ++color blue "\<(GRANT|GROUP|IF NOT EXISTS|IMMUTABLE|INDEX|INSERT|INTO|LABEL|LANGUAGE|LARGE|LOAD|LOCK)\>" ++color blue "\<(MAPPING FOR|MATERIALIZED|MOVE|NOTIFY|OBJECT|OPERATOR|OPTIONS|OWNED|OWNER)\>" ++color blue "\<(PARSER|PREPARED?|PRIVILEGES|REASSIGN|REFRESH|RELEASE|RESET|REVOKE|ROLE|ROLLBACK|RULE)\>" ++color blue "\<(SAVEPOINT|SCHEMA|SEARCH|SECURITY|SELECT|SEQUENCE|SERVER|SESSION|SET|SHOW|SPACE|START|SYSTEM)\>" ++color blue "\<(TABLE|TEXT|TO|TRANSACTION|TYPE|UPDATE|USER|VACUUM|VALUES|VIEW|WHERE|WITH|WRAPPER)\>" ++ ++# Strings. ++color brightyellow "<[^= ]*>" ""(\.|[^"])*"" ++ ++# Trailing whitespace. ++color ,green "[[:space:]]+$" ++ ++# Regular expressions. ++color brightmagenta "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*" ++ ++# Shell command expansion is in `backticks` or like %x{this}. These are ++# "double-quotish" (to use a perlism). ++color brightblue "`[^`]*`" "%x\{[^}]*\}" ++ ++# Strings, double-quoted. ++color green ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" ++color green "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!" ++ ++# Expression substitution. These go inside double-quoted strings, ++# "like #{this}". ++color brightgreen "#\{[^}]*\}" ++ ++# Strings, single-quoted. ++color green "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" ++color green "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!" ++ ++# Comments. ++color red "##?[^{].*" "##?$" ++color red "--[^{].*" "--$" ++color brightblue "//.*" ++color brightblue start="/\*" end="\*/" ++ ++# PostgreSQL markings. ++color red "(--)" ++ ++# PostgreSQL default schemas. ++color brightred "(pg_catalog|public)" ++ ++# PostgreSQL PLs. ++color brightblue "(pljava|plperlu?|plpgsql|plpy|plpythonu?|plr|plruby|plsh|pltcl|plscheme)" +Index: nano-7.2/syntax/properties.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/properties.nanorc +@@ -0,0 +1,9 @@ ++syntax properties "\.properties$" ++ ++color brightblack "^[[:space:]]*[^#!]([^:= ]|\\[:= ])*[:= ]" ++color red "[:=]" ++color magenta "\\([#!=: ]|$)" ++color magenta "\\u[[:xdigit:]]{4}" ++color cyan "^[[:space:]]*[#!].*$" ++color ,green "[[:space:]]+$" ++color ,red " + +| + +" +Index: nano-7.2/syntax/python.nanorc +=================================================================== +--- nano-7.2.orig/syntax/python.nanorc ++++ nano-7.2/syntax/python.nanorc +@@ -1,44 +1,56 @@ +-## Syntax highlighting for Python. ++## Python syntax highlighting rules for Nano + +-syntax python "\.py$" +-header "^#!.*python" ++syntax "python" "\.py$" ++header "^#!.*/(env +)?python[-0-9._]*( |$)" + magic "Python script" + comment "#" + +-# Alternative linter: pylint --exit-zero + linter pyflakes + +-# Function definitions. +-color brightblue "def [0-9A-Za-z_]+" +-# Keywords. +-color brightcyan "\<(and|as|assert|async|await|break|class|continue)\>" +-color brightcyan "\<(def|del|elif|else|except|finally|for|from)\>" +-color brightcyan "\<(global|if|import|in|is|lambda|nonlocal|not|or)\>" +-color brightcyan "\<(pass|raise|return|try|while|with|yield)\>" +- +-# These two are keywords in Python 2, but functions in Python 3, +-# so only color them when they are followed by whitespace, assuming +-# that print(x) is a function invocation and print (x) is a statement. +-color brightcyan "\<(exec|print)([[:blank:]]|$)" +- +-# Special values. +-color brightmagenta "\<(False|None|True)\>" +- +-# Mono-quoted strings. +-color brightgreen "'([^'\]|\\.)*'|"([^"\]|\\.)*"|'''|"""" +-color normal "'''|"""" +-# Comments. +-color brightred "(^|[[:blank:]])#.*" +-# Triple-quoted strings. +-color brightgreen start="'''([^'),]|$)" end="(^|[^(\])'''" +-color brightgreen start=""""([^"),]|$)" end="(^|[^(\])"""" +- +-# Backslash escapes. +-color lime "\\($|[\'"abfnrtv]|[0-3]?[0-7]?[0-7]|x[[:xdigit:]]{2})" +-color lime "\\(N\{[[:alpha:]]+\}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})" ++## built-in objects ++color cyan "\<(None|self|True|False|not)\>" ++## built-in attributes ++color cyan "\<(__builtin__|__dict__|__methods__|__members__|__class__|__bases__|__import__|__name__|__doc__|__self__|__debug__)\>" ++## built-in functions ++color brightcyan "\<(abs|append|apply|buffer|callable|chr|clear|close|closed|cmp|coerce|compile|complex|conjugate|copy|count|delattr|dir|divmod|eval|execfile|exec|extend|fileno|filter|float|flush|get|getattr|globals|has_key|hasattr|hash|hex|id|index|input|insert|int|intern|isatty|isinstance|issubclass|items|keys|len|list|locals|long|map|max|min|mode|name|oct|open|ord|pop|pow|print|range|raw_input|read|readline|readlines|reduce|reload|remove|repr|reverse|round|seek|setattr|slice|softspace|sort|str|tell|truncate|tuple|type|unichr|unicode|update|values|vars|write|writelines|xrange|zip|bool)\>" ++## built-in functions that were previously keywords ++color brightblue "\<(print|exec)\>([[:space:]]|$)" ++## special method names ++color cyan "\<(__abs__|__add__|__and__|__call__|__cmp__|__coerce__|__complex__|__concat__|__contains__|__del__|__delattr__|__delitem__|__delslice__|__div__|__divmod__|__float__|__getattr__|__getitem__|__getslice__|__hash__|__hex__|__init__|__int__|__inv__|__invert__|__len__|__long__|__lshift__|__mod__|__mul__|__neg__|__nonzero__|__oct__|__or__|__pos__|__pow__|__radd__|__rand__|__rcmp__|__rdiv__|__rdivmod__|__repeat__|__repr__|__rlshift__|__rmod__|__rmul__|__ror__|__rpow__|__rrshift__|__rshift__|__rsub__|__rxor__|__setattr__|__setitem__|__setslice__|__str__|__sub__|__xor__|__bool__)\>" ++## exception classes ++color brightblue "\<(ArithmeticError|AssertionError|AttributeError|DirectoryNotFoundError|EOFError|EnvironmentError|Exception|FileNotFoundError|FloatingPointError|IOError|ImportError|IndexError|IsADirectoryError|KeyError|KeyboardInterrupt|LookupError|MemoryError|NameError|NotImplementedError|OSError|OverflowError|PermissionError|RuntimeError|StandardError|SyntaxError|SystemError|SystemExit|TypeError|UnboundLocalError|UnicodeError|ValueError|WindowsError|ZeroDivisionError)\>" ++## types ++color brightcyan "\<(NoneType|TypeType|IntType|LongType|FloatType|ComplexType|StringType|UnicodeType|BufferType|TupleType|ListType|DictType|FunctionType|LambdaType|CodeType|ClassType|UnboundMethodType|InstanceType|MethodType|BuiltinFunctionType|BuiltinMethodType|ModuleType|FileType|XRangeType|TracebackType|FrameType|SliceType|EllipsisType)\>" ++## definitions ++color brightcyan "def [a-zA-Z_0-9]+" ++## keywords ++color brightred "\<(and|as|assert|async|await|break|class|continue|def|del|elif|else|except|finally|for|from|global|if|import|in|is|lambda|map|or|pass|raise|return|try|with|while|yield)\>" ++ ++## decorators ++color brightgreen "@.*[(]" ++ ++## operators ++color brightred "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&" ++ ++## parentheses ++color brightyellow "[(){}]" "\[" "\]" ++ ++## numbers ++icolor brightcyan "\b(([1-9][0-9]+)|0+)\.[0-9]+j?\b" "\b([1-9][0-9]*[Lj]?)\b" "\b0o?[0-7]*L?\b" "\b0x[1-9a-f][0-9a-f]*L?\b" "\b0b[01]+\b" ++ ++ ++## strings ++color yellow "['][^']*[^\\][']" "[']{3}.*[^\\][']{3}" ++color yellow "["][^"]*[^\\]["]" "["]{3}.*[^\\]["]{3}" ++ ++## comments ++color brightblack "^#.*|[[:space:]]#.*$" + +-# Reminders. +-color brightwhite,yellow "\<(FIXME|TODO|XXX)\>" ++## block comments ++color yellow start=""""[^"]" end=""""" start="'''[^']" end="'''" + +-# Trailing whitespace. +-color ,green "[[:space:]]+$" ++## trailing spaces ++color ,brightgreen "[[:space:]]+$" ++ ++## reminders ++color brightwhite,yellow "(FIXME|TODO|XXX)" +Index: nano-7.2/syntax/sed.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/sed.nanorc +@@ -0,0 +1,9 @@ ++syntax SED "\.sed$" ++header "^#!.*bin/(env +)?sed( |$)" ++ ++color red "[|^$.*+]" ++color brightyellow "\{[0-9]+,?[0-9]*\}" ++color magenta "\\." ++color brightblack "(^|[[:space:]])#([^{].*)?$" ++color ,green "[[:space:]]+$" ++color ,red " + +| + +" +Index: nano-7.2/syntax/sh.nanorc +=================================================================== +--- nano-7.2.orig/syntax/sh.nanorc ++++ nano-7.2/syntax/sh.nanorc +@@ -1,39 +1,39 @@ +-## Syntax highlighting for Bourne shell scripts. +- ++# Bash only syntax highlighting ++# + syntax sh "(\.sh|(\.|/)(a|ba|c|da|k|mk|pdk|tc|z)sh(rc|_profile)?|/(etc/|\.)profile)$" + header "^#!.*/((env[[:blank:]]+)?((a|ba|c|da|k|mk|pdk|tc|z)?sh)|busybox[[:blank:]]+sh|openrc-run|runscript)\>" + header "-\*-.*shell-script.*-\*-" + magic "(POSIX|Bourne-Again) shell script.*text" + comment "#" + +-linter dash -n ++## Control ++color brightcyan "\<(if|else|for|function|case|esac|in|select|until|while|do|elif|then|set|\.|done|fi)\>" ++ ++## Builtins ++color cyan "\<(source|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|suspend|test|times|trap|type|ulimit|umask|unalias|wait|export|local|unset|tput)\>" ++ ++## Unix Commands ++color brightcyan "\<(7zz|aclocal|aconnect|add-apt-key|add-apt-repository|addgroup|adduser|aplay|apm|apmsleep|apropos|apt|apt-get|apt-key|aptitude|ar|arch|arecord|as|as86|autoconf|autoheader|automake|awk|basename|bash|bc|beep|bison|blkid|btrfs|bunzip2|byobu|bzcat|bzcmp|bzdiff|bzegrep|bzfgrep|bzgrep|bzip2|bzip2recover|bzless|bzmore|c\+\+|cal|cat|cc|ccache|ccze|cd-read|cdda2wav|cdparanoia|cdrdao|cdrecord|chattr|chfn|chgrp|chmod|chown|chronyc|chroot|chsh|chvt|clear|cmp|co|col|comm|cp|cpio|cpp|curl|cut|date|dc|dd|deallocvt|deluser|df|diff|diff3|dig|dir|dircolors|directomatic|dirname|dmesg|dnsdomainname|domainname|dos2unix|dpkg|dpkg-reconfigure|du|dumpkeys|echo|ed|egrep|elinks|env|expr|fail2ban-client|false|fbset|fdisk|ffmpeg|ffprobe|fgconsole|fgrep|file|find|flex|flex\+\+|fmt|free|ftp|funzip|fuser|g\+\+|gawk|gc|gcc|gdb|gdisk|getent|getkeycodes|getopt|gettext|gettextize|gimp|gimp-remote|gimptool|gmake|gocr|gpg|grep|groupadd|groups|gs|gunzip|gzexe|gzip|hddtemp|head|hexdump|hostname|hwinfo|id|igawk|install|join|jq|kbd_mode|kbdrate|kill|killall|last|lastb|lbzip2|ld|ld86|ldd|less|lex|link|ln|loadkeys|loadunimap|locate|lockfile|login|logname|lp|lpr|ls|lsattr|lshw|lsmod|lsmod.old|lsof|lynx|m4|make|man|mapscrn|mediainfo|mesg|mkdir|mkfifo|mknod|mktemp|mkvextract|mkvmerge|more|mount|msgfmt|mv|mysql|namei|nano|nasm|nawk|nc|netstat|nginx|nice|nisdomainname|nl|nm|nm86|nmap|nohup|nop|oathtool|od|openssl|openvt|parallel|passwd|patch|pcregrep|pcretest|perl|perror|pgawk|pidof|ping|pip|pip3|pr|printf|procmail|prune|ps|ps2ascii|ps2epsi|ps2frag|ps2pdf|ps2ps|psbook|psmerge|psnup|psresize|psselect|pstops|pstree|pv|pwd|rar|rbash|rclone|rcs|readlink|red|resizecons|rev|rm|rmdir|rsync|run-parts|sash|scp|sed|seq|service|setfacl|setfont|setkeycodes|setleds|setmetamode|setserial|setterm|sh|showkey|shred|size|size86|skill|sleep|slogin|smartctl|snice|sort|source-highlight|sox|split|sponge|ssed|ssh|ssh-add|ssh-agent|ssh-keygen|ssh-keyscan|stat|strings|strip|stty|su|sudo|suidperl|sum|sync|systemctl|tac|tail|tar|tee|tempfile|test|tmux|touch|tr|true|umount|uname|unicode_start|unicode_stop|uniq|unlink|unmount|unrar|unzip|updatedb|updmap|uptime|usermod|users|utmpdump|uuidgen|vdir|vmstat|w|wall|wc|wget|whatis|whereis|which|who|whoami|write|xargs|xmlstarlet|xz|yacc|yes|ypdomainname|zcat|zcmp|zdiff|zegrep|zfgrep|zforce|zfs|zgrep|zip|zless|zmore|znew|zpool|zsh)\>" + +-# Function declarations. +-color brightgreen "^[A-Za-z0-9_-]+\(\)" ++## Strings ++color brightgreen "\"(\\.|[^\"])*\"" ++color brightgreen "'(\\.|[^\'])*'" + +-# Keywords, symbols, and comparisons. +-color green "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>" +-color green "\<(declare|eval|exec|export|let|local)\>" +-color green "[][{}():;|`$<>!=&\]" +-color green "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>" +- +-# Short and long options. +-color brightmagenta "[[:blank:]](-[A-Za-z]|--\<[A-Za-z-]+)\>" +- +-# Common commands. +-color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|cut|echo|env|grep|head|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|sort|tail|tar|touch|umask|unset)\>" +-color normal "[.-]tar\>" ++## Variables ++# NOTE: Keep this section below the Strings section, such that Variables are highlighted inside strings. ++color brightmagenta start="[$@%]" end="([[:alnum:]]|_)*" ++ ++color brightyellow "[][{}():;|`$<>!=&\]" ++color brightcyan "-(eq|ne|gt|lt|ge|le|ef|ot|nt)\>" + + # Basic variable names (no braces). +-color brightred "\$([-@*#?$!0-9]|[[:alpha:]_][[:alnum:]_]*)" ++color brightmagenta "\$([-@*#?$!0-9]|[[:alpha:]_][[:alnum:]_]*)" + # More complicated variable names; handles braces and replacements and arrays. +-color brightred "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:blank:]]*[[:alnum:]_]+[[:blank:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})" +- +-# Comments. +-color cyan "(^|[[:blank:]])#.*" ++color brightmagenta "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:blank:]]*[[:alnum:]_]+[[:blank:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})" + +-# Strings. +-color brightyellow ""([^"\]|\\.)*"|'([^'\]|\\.)*'" ++## Brackets nd redirects ++color brightyellow "[(){}[;|<>]" ++color yellow "\]" + +-# Trailing whitespace. +-color ,green "[[:space:]]+$" ++## Comments ++color brightblack "(^|[[:blank:]])#.*" +Index: nano-7.2/syntax/systemd.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/systemd.nanorc +@@ -0,0 +1,12 @@ ++syntax "Systemd" "\.(service|socket|timer)$" ++header "^\[Unit\]$" ++ ++color cyan "^(Accept|AccuracySec|After|Alias|AllowIsolate|Also|AmbientCapabilities|AssertPathExists|AssertPathIsReadWrite|Backlog|Before|BindsTo|BusName|CacheDirectory|CacheDirectoryMode|CapabilityBoundingSet|ConditionACPower|ConditionCapability|ConditionDirectoryNotEmpty|ConditionFileIsExecutable|ConditionFileNotEmpty|ConditionFirstBoot|ConditionKernelCommandLine|ConditionNeedsUpdate|ConditionPathExists|ConditionPathExistsGlob|ConditionPathIsMountPoint|ConditionPathIsReadWrite|ConditionPathIsSymbolicLink|ConditionSecurity|ConditionVirtualization|ConfigurationDirectory|Conflicts|CPUSchedulingPolicy|DefaultDependencies|DefaultInstance|Delegate|Description|DeviceAllow|DevicePolicy|DirectoryNotEmpty|Documentation|Environment|EnvironmentFile|ExecReload|ExecStart|ExecStartPost|ExecStartPre|ExecStop|FailureAction|FileDescriptorStoreMax|Group|GuessMainPID|IgnoreOnIsolate|IgnoreSIGPIPE|IOSchedulingClass|IOSchedulingPriority|IPAddressDeny|JobTimeoutAction|JobTimeoutSec|KeyringMode|KillMode|KillSignal|LazyUnmount|LimitCORE|LimitMEMLOCK|LimitNOFILE|LimitNPROC|ListenDatagram|ListenFIFO|ListenNetlink|ListenSequentialPacket|ListenSpecial|ListenStream|LoadCredential|LockPersonality|LogsDirectory|LogsDirectoryMode|MakeDirectory|MaxConnections|MemoryDenyWriteExecute|Nice|NonBlocking|NoNewPrivileges|NotifyAccess|OnActiveSec|OnBootSec|OnCalendar|OnFailure|OnFailureJobMode|OnStartupSec|OnUnitActiveSec|OnUnitInactiveSec|OOMScoreAdjust|Options|PAMName|PartOf|PassCredentials|PassPacketInfo|PassSecurity|PathChanged|PermissionsStartOnly|Persistent|PIDFile|PrivateDevices|PrivateMounts|PrivateNetwork|PrivateTmp|PrivateUsers|ProcSubset|ProtectClock|ProtectControlGroups|ProtectHome|ProtectHostname|ProtectKernelLogs|ProtectKernelModules|ProtectKernelTunables|ProtectProc|ProtectSystem|RandomizedDelaySec|ReadOnlyPaths|ReadWritePaths|ReceiveBuffer|RefuseManualStart|RefuseManualStop|RemainAfterExit|RemoveOnStop|RequiredBy|Requires|RequiresMountsFor|Requisite|Restart|RestartKillSignal|RestartPreventExitStatus|RestartSec|RestrictAddressFamilies|RestrictNamespaces|RestrictRealtime|RestrictSUIDSGID|RuntimeDirectory|RuntimeDirectoryMode|RuntimeDirectoryPreserve|SendBuffer|SendSIGHUP|SendSIGKILL|Service|Slice|SocketGroup|SocketMode|Sockets|SocketUser|StandardError|StandardInput|StandardOutput|StartLimitBurst|StartLimitInterval|StartLimitIntervalSec|StateDirectory|StopWhenUnneeded|SuccessAction|SuccessExitStatus|SupplementaryGroups|Symlinks|SyslogIdentifier|SystemCallArchitectures|SystemCallErrorNumber|SystemCallFilter|TasksMax|TimeoutSec|TimeoutStartSec|TimeoutStopSec|Timestamping|TTYPath|TTYReset|TTYVHangup|TTYVTDisallocate|Type|UnsetEnvironment|User|UtmpIdentifier|WantedBy|Wants|WatchdogSec|What|Where|WorkingDirectory|Writable)=" ++color brightgreen "^\.include\>" ++color brightred "=" ++color brightmagenta "^\[(Unit|Install|Service|Socket)\]" ++color brightyellow "\$MAINPID" ++color brightcyan "\<(true|false)\>" ++color brightblack "(^|[[:space:]])#([^{].*)?$" ++color ,green "[[:space:]]+$" ++color ,red " + +| + +" +Index: nano-7.2/syntax/vi.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/vi.nanorc +@@ -0,0 +1,10 @@ ++syntax VI "(^|/|\.)(ex|vim)rc$|\.vim" ++ ++color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]" ++color cyan "\<([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?unm)\>" ++color cyan "\<(snor|nun|nm|set|if|endif|let|unlet)\>" ++color red "[!&=]" ++color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'" ++color brightblack "(^|[[:space:]])\"[^"]*$" ++color ,green "[[:space:]]+$" ++color ,red " + +| + +" +Index: nano-7.2/syntax/yaml.nanorc +=================================================================== +--- nano-7.2.orig/syntax/yaml.nanorc ++++ nano-7.2/syntax/yaml.nanorc +@@ -1,47 +1,27 @@ +-## Syntax highlighting for YAML files. ++syntax "yaml" "\.ya?ml$" ++#comment "#" ++#header "^---" "%YAML" ++header "^%YAML |^---( |$)" + +-## Original author: Benno Schulenberg +-## License: GPL version 3 or newer ++color normal "[:,]( |$)" + +-syntax yaml "\.ya?ml$" +-header "^%YAML |^---( |$)" ++# Values ++color yellow "(:|^|\s)+\S+" + +-tabgives " " +-comment "#" ++# Keys ++color brightred "(^|\s+).*+\s*:(\s|$)" + +-# Keys: +-color lightgreen "(\w|::|[/.-])+:( |$)" +-color lightgreen "\[(\w|::|[/., -])+\]:( |$)" +- +-# Values (booleans, numbers, octal/hex): +-color lightmagenta "[:,] +(Y(es)?|No?|y(es)?|no?|[Tt]rue|[Ff]alse|[Oo](n|ff))( *[]}]|, | +#|$)" +-color lightmagenta "[:,] +[+-]?[0-9]+(\.([0-9]+)?)?( *[]}]|, | +#|$)" +-color lightmagenta " 0(o[0-7]+|x[[:xdigit:]]+)( *[]}]|, | +#|$)" +-color normal "[:,]( |$)" +-# Values (dates, strings): +-color lightmagenta " [12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])" +-color lightmagenta "("([^"]|\\")+"|'[^']+')" +- +-# Anchors and aliases: +-color pink " [&*](\w|-)+( |$)" +- +-# Symbols: +-color bold,lagoon "^(%YAML +[1-9]\.[0-9]$|%TAG |(---|\.\.\.)( |$))" +-color bold,lagoon " [|>]([1-9]?[+-]|[+-][1-9]?)?$" +-color bold,yellow "^ *(\?|([?:] +)?-) " +-color yellow "[]{}[]" +-color normal "^ *: " +- +-# Tags: +-color mint " !!(binary|bool|float|int|map|null|omap|seq|set|str)( |,|$)" +-color mint " ![^! ][^ ]*( |$)" +- +-# Escaped characters: +-color orange "\\([0abefnrtv"/ \_NLP]|$)" +-color orange "\\(x[[:xdigit:]]{2}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8})" ++# Special values ++color cyan "[:-]\s+(true|false|null)\s*$" ++color brightcyan "[:-]\s+[0-9]+\.?[0-9]*(\s*($|#))" ++color brightyellow "(^| )!!(binary|bool|float|int|map|null|omap|seq|set|str) " ++ ++# Separator ++color brightwhite "^\s+-" ++color brightwhite ":(\s|\t|$)" + +-# Mistakes (control codes, trailing space): +-color ,red "[[:cntrl:]]| +$" ++# Comments ++color brightblack "(^|[[:space:]])#.*$" + +-# Comments: +-color italic,cyan "(^| )#.*" ++# Trailing whitespace ++color ,red "[[:space:]]+$" +Index: nano-7.2/syntax/zsh.nanorc +=================================================================== +--- /dev/null ++++ nano-7.2/syntax/zsh.nanorc +@@ -0,0 +1,42 @@ ++## Syntax highlighting for ZSH scripts (initially copied from sh.nanorc) ++syntax ZSH "\.zsh$" "\.?(zshenv|zprofile|zshrc|zlogin|zlogout)$" ++header "^#!.*/(env +)?zsh( |$)" ++ ++## Numbers ++color brightyellow "\b[0-9]+\b" ++ ++## Conditionals and control flow ++color green "\<(always|break|bye|case|continue|disown|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" ++ ++color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" ++## Conditional flags ++color green "-[Ldefgruwx]\>" ++color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" ++ ++## Bash-inherited ++color brightblue "\<((un)?alias|bindkey|builtin|cd|declare|eval|exec|export|jobs|let|popd|pushd|set|source|typeset|umask|unset)\>" ++## ZSH-specific ++color brightblue "\<(add-zsh-hook|autoload|chdir|compinit|dirs|(dis|en)able|echotc|emulate|print|prompt(init)?|(un)?setopt|zle|zmodload|zstyle|whence)\>" ++ ++## Common linux commands ++color brightmagenta "\<((g|ig)?awk|find|\w{0,4}grep|kill|killall|\w{0,4}less|make|pkill|sed|tar)\>" ++ ++## Coreutils commands ++color brightmagenta "\<(base64|basename|cat|chcon|chgrp|chmod|chown|chroot|cksum|comm|cp|csplit|cut|date|dd|df|dir|dircolors|dirname|du|echo|env|expand|expr|factor|false|fmt|fold|head|hostid|id|install|join|link|ln|logname|ls|md5sum|mkdir|mkfifo|mknod|mktemp|mv|nice|nl|nohup|nproc|numfmt|od|paste|pathchk|pinky|pr|printenv|printf|ptx|pwd|readlink|realpath|rm|rmdir|runcon|seq|(sha1|sha224|sha256|sha384|sha512)sum|shred|shuf|sleep|sort|split|stat|stdbuf|stty|sum|sync|tac|tail|tee|test|timeout|touch|tr|true|truncate|tsort|tty|uname|unexpand|uniq|unlink|users|vdir|wc|who|whoami|yes)\>" ++ ++## Function definition ++icolor brightgreen "^\s+(function\s+)[0-9A-Z_]+\s+\(\)" ++ ++## Variables ++icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" ++ ++## Strings ++color yellow ""(\\.|[^"])*"" ++color yellow "'(\\.|[^'])*'" ++ ++## Comments ++color cyan "(^|[[:space:]])#.*$" ++color brightcyan "(^|[[:space:]])##.*$" ++ ++## Trailing spaces ++color ,blue "[[:space:]]+$" diff -Nru nano-7.2/debian/patches/series nano-7.2/debian/patches/series --- nano-7.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ nano-7.2/debian/patches/series 2023-02-27 09:24:33.000000000 +0000 @@ -0,0 +1 @@ +000more-syntax-highlighting.patch