kxylxp / grub4dos-chenall

Automatically exported from code.google.com/p/grub4dos-chenall
0 stars 0 forks source link

Can && and || work like ;; ? #127

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
set a=abcd ;; echo %a% ;; set a=
pause
set aa=abcde && echo %aa% && set aa=
pause

What is the expected output? What do you see instead?

abcd

not

abcd
abcde

can && and || work in the same way as ;; and execute the commands with the 
environment from the previous command?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by Steve6375 on 28 Mar 2013 at 2:54

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
This may make compatibility issues..

and I think Current is good.because

setlocal
set a=test
xxx
endlocal && set a=%a%

Original comment by chenall.cn on 29 Mar 2013 at 5:55

GoogleCodeExporter commented 8 years ago
OK - is it worth having &&& and ||| ???

Original comment by Steve6375 on 29 Mar 2013 at 9:54

GoogleCodeExporter commented 8 years ago
Try this..
New  operator "&;" and "|;",Same as "&&" and "||" but run like ";;".

^_^.Hope it's useful.

Original comment by chenall.cn on 31 Mar 2013 at 5:27

Attachments:

GoogleCodeExporter commented 8 years ago
That's great!  :-)
thanks!

using ;; &; and |; will save a lot of confusion that things like...

set f=fred && set g=%f% doris && set h=%g% jim && echo %f% %g% %h%

caused

:-)

Original comment by Steve6375 on 31 Mar 2013 at 9:51