Skip to content

Instantly share code, notes, and snippets.

@1ijack
Last active August 14, 2018 03:41
Show Gist options
  • Save 1ijack/e741ab130a8a389cf09d870c440f0edd to your computer and use it in GitHub Desktop.
Save 1ijack/e741ab130a8a389cf09d870c440f0edd to your computer and use it in GitHub Desktop.
Remove/Restore prompt console settings for easier visiblity/debug of batch files in 2 lines
rem - Name: PrettyDebug
rem - Description: Removes Prompt settings for easier visiblity/debug of batch files
rem - srcURL: jxeHead -- https://gist.github.com/1ijack/e741ab130a8a389cf09d870c440f0edd
rem Add to script or run the next line to archive/clear prompt settings and turn echo on
(((@echo on) &if defined prompt set "restore{prompt}=%prompt%") &set "prompt=$") & rem debug pretty print
rem Add to script or run the next line to restore prompt settings and turn echo off
@(((echo off) &if defined restore{prompt} set "prompt=%restore{prompt}%") &set "restore{prompt}=") & rem tnirp ytterp gubed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment