You are here: PSPad forum > Bug report / Hlášení chyb > Re: Windows Shell Script highlighter bugs
Posted by: Mike4Online | Date: 2015-11-17 22:05 | IP: IP Logged
Using PsPad 4.6.1 (2703), running on Windows 7 Professional 64-bit with Intel graphics, the following highlighter bugs appear for Windows Shell Script:
REM --- Hyphenated labels have incorrect highlighting, both on the label itself
REM and on any goto statements:
goto hyphenated-string
:hyphenated-string
REM In the abnove examples, '-string' should appear dark red, rather than black.
REM --- ECHO statements with values containing a period lose their highlighting:
echo Be sure to use numerals and decimal points only, and include
echo all four version components: major.minor.build.revision
REM --- A highlighting issue exists for any command that takes a quoted filename
REM or other quoted value as a parameter, unless that parameter is a quoted
REM environment variable with no additional text. For example, the keyword
REM 'find' is not properly highlighted in the second statement:
svn.exe info "%SVNROOT%" | find "Revision: " > "%TEMP%\RepoVersion.tmp"
svn.exe info "%SVNROOT%/@HEAD" | find "Revision: " > "%TEMP%\RepoVersion.tmp"
REM --- In the above example, note that the values
REM which appear after 'find' have incorrect blue color only in the first
REM statement, even though the term 'find' has correct pink color.
REM --- The same issue also occurs with IF statements. The second statement
REM in each of the following sets has incorrect blue color:
if not exist "%FOLDER%" goto missing
if not exist "%FOLDER%\test.txt" goto missing
if not exist %FOLDER%\test.txt goto missing
if exist "%windir%" set CSCRIPTEXE=%windir%\SysWOW64\cscript.exe
if exist "%windir%\SysWOW64" set CSCRIPTEXE=%windir%\SysWOW64\cscript.exe
if exist %windir%\SysWOW64 set CSCRIPTEXE=%windir%\SysWOW64\cscript.exe
To see these bugs, copy all of the above code into PsPad and set the highlighter to Windows Sehll script.
One other thing. I have a huge batch file used as a software build script. It is 530 KB in size. So big that no highlighting appears in PsPad.
I could split this huge batch file into multiple files, but for various reasons it is best to leave it as one big file. It would be great if the file size limit for highlighting could be pushed up to 1 MB or more.
Thanks,
- Michael
Posted by: pspad | Date: 2015-11-18 05:28 | IP: IP Logged
Thank you. I will try to fixx it all
Posted by: Mike4Online | Date: 2016-02-26 02:29 | IP: IP Logged
Jan,
I just tested these issues in Build 2707, and the labels with hyphens (or underscores) are corrected. Also, the ECHO statements containing periods no longer cause highlighting to be lost.
These are excellent improvements to the Windows Shell Script highlighter. My batch file editing is now much easier to view. Thank you for putting in the time to do this.
As for the other issues, I assume these may be more difficult and take more time.
Also, I found the advanced setting where I could increase the size fo the file that the highlighter will support. So I once again have syntax highlighting in my massive batch file.
Best wishes,
- Michael
Edited 1 time(s). Last edit at 2016-02-26 02:31 by Mike4Online.
Posted by: pspad | Date: 2016-02-26 06:07 | IP: IP Logged
There are some small problems yet, but I have all in my list.
The bad is I am very overextended in my work now
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR