We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00a8ab0 commit 7e78430Copy full SHA for 7e78430
1 file changed
discovers_and_bugs/discovers/splitCommand.bat
@@ -0,0 +1,19 @@
1
+@echo off
2
+
3
+:: https://stackoverflow.com/a/64752041/388389
4
+:: Splits a long command into a few lines.
5
+:: Limitations are that some special symbols should be escaped (carets, closing brackets and etc.)
6
7
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
8
+set "{{=setlocal enableDelayedExpansion&for %%a in (" & set "}}="::end::" ) do if "%%~a" neq "::end::" (set command=!command! %%a) else (call !command! & endlocal)"
9
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
10
11
+:: Example:
12
13
+%{{%
14
+ echo
15
+ "command"
16
+ written
17
+ on a
18
+ few lines
19
+%}}%
0 commit comments