From f9c86cd3b73c5d94b35f92535d70d2dafcdcb0f5 Mon Sep 17 00:00:00 2001 From: davidhcefx Date: Mon, 31 Aug 2020 10:21:54 +0800 Subject: [PATCH 1/3] Delete batch.nanorc --- batch.nanorc | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 batch.nanorc diff --git a/batch.nanorc b/batch.nanorc deleted file mode 100644 index 0001dd1..0000000 --- a/batch.nanorc +++ /dev/null @@ -1,39 +0,0 @@ -## Nano syntax highlighting file for Batch -## Written by Dante Falzone https://github.com/DanteFalzone0 - -syntax "Batch" "\.[bB][aA][tT]$" "\.[cC][mM][dD]$" -comment "REM" - -## Commands for basic I/O -icolor green "\<(cls|echo|pause|choice|more|type)\>" - -## Commands for file operations -icolor green "\<(assoc|cd|copy|del|move|path|rd|ren|vol|attrib|chkdsk|comp|convert)\>" -icolor green "\<(expand|format|label|subst|xcopy|robocopy|fc|diskpart|md|mkdir)\>" - -## Other commands -icolor cyan "\<(ver|dir|date|exit|prompt|start|time|cmd|driverquery|find|help|ipconfig)\>" -icolor cyan "\<(net|ping|shutdown|sort|systeminfo|taskkill|tasklist|tree|title|set)\>" - -## Operators -icolor yellow "[.:;,+*-/|=!<>&%@\"]" - -## Executable files -icolor brightred "[[:graph:]]+\.exe[[:space:]]" -icolor brightred "[[:graph:]]+\.exe$" - -## Switches and labels -icolor brightmagenta "/[[:graph:]]+$" -icolor brightmagenta "/[[:graph:]]+[[:space:]]" - -## Numerals -icolor brightyellow "[[:digit:]]" - -## Block delimeters -icolor magenta "[(){}]" - -## Comments -icolor brightblue "REM.*" - -## Trailing whitespace -color ,green "[[:space:]]+$" From 79b2b9d9510a7fcf2bd6649acd66a2c0ac55913d Mon Sep 17 00:00:00 2001 From: davidhcefx Date: Mon, 31 Aug 2020 10:22:18 +0800 Subject: [PATCH 2/3] Create batch.nanorc --- batch.nanorc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 batch.nanorc diff --git a/batch.nanorc b/batch.nanorc new file mode 100644 index 0000000..8b11b87 --- /dev/null +++ b/batch.nanorc @@ -0,0 +1,34 @@ +## Here is an example for Batch file shell script. +## Author: davidhcefx, based on Mitch Bumgarner's version. +## License: MIT License + +syntax "batch" "\.(bat|cmd)$" +header "^@[eE](cho|CHO) (on|off|ON|OFF)" +comment "::" + +# Native commands, symbols, and comparisons. +icolor green "\<(ASSOC|CALL|CD|CLS|CMDEXTVERSION|COLOR|COPY|DATE|DEL|DIR|ECHO|ENDLOCAL|ERASE|ERRORLEVEL|EXIT|FOR|FTYPE|GOTO|IF|MD|MKLINK|MOVE|PATH|PAUSE|POPD|PROMPT|PUSHD|RD|REM|REN|SET|SETLOCAL|SHIFT|START|TIME|TITLE|TYPE|VER|VERIFY|VOL)\>" +icolor green "\<(EQU|NEQ|LSS|LEQ|GTR|GEQ|DEFINED|EXIST|NOT)\>" +color green "[:|<>=&@\\^]" + +# Options. +color brightmagenta "[[:blank:]]/[A-Za-z]+\>" + +# Common commands. (with Sublime and Github highlighting as a reference) +icolor brightblue "\<(APPEND|ARP|AT|ATTRIB|AUTOFAIL|BACKUP|BCDBOOT|BCDEDIT|BITSADMIN|BREAK|CACLS|CERTREQ|CERTUTIL|CHANGE|CHCP|CHDIR|CHKDSK|CHKNTFS|CHOICE|CIPHER|CleanMgr|CLIP|CMD|CMDKEY|COMP|COMPACT|CONVERT|CSVDE|DEFRAG|DELTREE|DevCon|DIRQUOTA|DISKCOMP|DISKCOPY|DISKPART|DISKSHADOW|DNSCMD|DOSKEY|DriverQuery|DSACLs|DSAdd|DSGet|DSQuery|DSMod|DSMove|DSRM|Dsmgmt|EVENTCREATE|EXPAND|EXPLORER|EXTRACT|FC|FIND|FINDSTR|FORFILES|FORMAT|FREEDISK|FSUTIL|FTP|GETMAC|GPRESULT|GPUPDATE|GRAFTABL|HELP|HOSTNAME|iCACLS|IEXPRESS|IPCONFIG|INUSE|KEYB|LABEL|LODCTR|LOGMAN|LOGOFF|MAKECAB|MKDIR|MODE|MORE|MOUNTVOL|MSG|MSIEXEC|MSINFO32|MSTSC|NET|NETDOM|NETSH|NBTSTAT|NETSTAT|NLTEST|NSLOOKUP|NTBACKUP|NTDSUtil|OPENFILES|PATHPING|PING|POWERCFG|PRINT|PRNCNFG|PRNMNGR|Query|RASDIAL|RASPHONE|RECOVER|REG|REGEDIT|REGSVR32|REGINI|RENAME|REPLACE|Reset|RESTORE|RMDIR|ROBOCOPY|ROUTE|RUNAS|RUNDLL32|SC|SCHTASKS|SetSPN|SETX|SFC|SHUTDOWN|SORT|SSH|SUBINACL|SUBST|SYSTEMINFO|TAKEOWN|TASKLIST|TASKKILL|TELNET|TIMEOUT|TRACERT|TREE|TSDISCON|TSKILL|TypePerf|TZUTIL|VSSADMIN|W32TM|WAITFOR|WBADMIN|WECUTIL|WEVTUTIL|WHERE|WHOAMI|WINRM|WINRS|WMIC|XCACLS|XCOPY)\>" + +# Variable names. (spaces not allowed) +color brightred "%([[:alpha:]`~@#$*(){}:',.?+=_-]|\[|\])([[:alnum:]`~@#$*(){}:',.?+=_-]|\[|\])*%" +color brightred "!([[:alnum:]`~@#$%*(){}:',.?+=_-]|\[|\])([[:alnum:]`~@#$%*(){}:',.?+=_-]|\[|\])*!" + +# Parameter names for arguments and loop. +color brightred "%(~[[:alpha:]$]*)?[0-9*]\>" "%%(~[[:alpha:]$]*)?[[:alpha:]]\>" + +# Comments. +icolor cyan "^[[:space:]]*(\|::).*" + +# Strings. +icolor brightyellow ""(\^.|[^"])*"" + +# Trailling whitespace +color ,green "[[:space:]]+$" From 66c3512fabc3acc171ba2151f48805e9e791866f Mon Sep 17 00:00:00 2001 From: davidhcefx Date: Tue, 1 Sep 2020 05:05:02 +0800 Subject: [PATCH 3/3] Add a link --- batch.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/batch.nanorc b/batch.nanorc index 8b11b87..bc936d8 100644 --- a/batch.nanorc +++ b/batch.nanorc @@ -1,5 +1,5 @@ ## Here is an example for Batch file shell script. -## Author: davidhcefx, based on Mitch Bumgarner's version. +## Author: davidhcefx (https://github.com/davidhcefx), based on Mitch Bumgarner's version. ## License: MIT License syntax "batch" "\.(bat|cmd)$"