[Github-comments] [geany/geany] Incorrect comment delimiter (comment_single) in filetypes.batch file (Windows batch) (#1912)

dyura notifications at xxxxx
Tue Jul 31 17:21:39 UTC 2018


Currently Geany,  unlike other editors, is using double colons (::) as comment_single. What is the reason? 
REM (with trailing space) is much more appropriate. A citation:
" REM is the standards-compliant, documented statement to insert comments in batch files;
  double colons are a non-documented and non-compliant way to insert comments".
I will give two examples when using "::" is problematic.
First example:
IF 1 equ 1 (
	:: Comment line 1
	ECHO Do something
	REM Comment line 2
	:: Comment line 2
)
Here double colons give an error: ") was unexpected at this time." 
Second example:
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^ 
:: /log="%log_file%" ^
  /command ^
    "open %serverURL% -hostkey=* -privatekey=%keys%\%ppk% -rawsettings TryAgent=0 AuthKI=0" ^
    "put  ""%file_send%""" ^
    "exit"
Because line continuation "^" is applicable to empty label (::), double colons here are commenting out all lines starting from the second to the very end,  instead of commenting out only a single line. 
I believe comment_single should be "comment_single=REM "

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1912
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180731/26d3eaf5/attachment-0001.html>


More information about the Github-comments mailing list