Pixelpanic / winff

Automatically exported from code.google.com/p/winff
0 stars 0 forks source link

Improving command line readability thought line breaks (and @Prompt -$G) #167

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
BEFORE:
"C:\Program Files\WinFF\ffmpeg.exe" -threads 2  -y -i "D:\Downloads
\2\Test.mp4" -vcodec flv -f flv -r 29.97 ...

AFTER:
"C:\Program Files\WinFF\ffmpeg.exe" -threads 2  ^
   -y -i "D:\Downloads\2\Test.mp4" ^
   -vcodec flv ^
   -f flv ^
   -r 29.97...

Under Windows you can break a commandline with '^' and so greatly
improve it's readability and maintainability.
(Actually '^' just tells the parser to ignore the next char - what is
here a linebreak)
________________________________________________________________

And some other thing I used to add to scripts at the beginning
@Prompt -$G
So you'll see
->

instead of
c:\Program Files\Blah\Blah>

as prompt.
If you've a long path things will get messy and well I know/don't care
what path I'm in. If I need to know I just type "CD"<Enter>.

Well I 'fixed' that on my system by that regpatch:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor]
"AutoRun"="Prompt -$G"
^-So I don't need '@Prompt -$G' at the beginning of each script

Well through that regpatch I don't really need this for "WinFF" -
however may it's worth to consider adding this - or mention it in the
help

Original issue reported on code.google.com by AsselP...@gmail.com on 29 May 2012 at 8:57

GoogleCodeExporter commented 8 years ago

Original comment by poipodec...@hotmail.com on 8 Jul 2012 at 5:35

GoogleCodeExporter commented 8 years ago
Right now newline characters are deleted from command lines automatically to 
prevent malicious presets that execute other commands. That way when a command 
line that has malicious code will break with an error.

Original comment by bgg...@gmail.com on 13 Jun 2013 at 2:39