implement quote minimizing as --minimize-quote option instead of -m
This commit is contained in:
parent
8b701328bc
commit
800ee2b651
2 changed files with 4 additions and 4 deletions
|
|
@ -167,12 +167,11 @@ int main(int argc, char* argv[])
|
||||||
// processing before output
|
// processing before output
|
||||||
// minimize
|
// minimize
|
||||||
if(options['m'])
|
if(options['m'])
|
||||||
{
|
|
||||||
minimize_quotes(sh);
|
|
||||||
opt_minimize=true;
|
opt_minimize=true;
|
||||||
}
|
|
||||||
if(options["remove-unused"])
|
if(options["remove-unused"])
|
||||||
delete_unused( sh, re_var_exclude, re_fct_exclude );
|
delete_unused( sh, re_var_exclude, re_fct_exclude );
|
||||||
|
if(options["minimize-quotes"])
|
||||||
|
minimize_quotes(sh);
|
||||||
if(options["minimize-var"])
|
if(options["minimize-var"])
|
||||||
minimize_var( sh, re_var_exclude );
|
minimize_var( sh, re_var_exclude );
|
||||||
if(options["minimize-fct"])
|
if(options["minimize-fct"])
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,9 @@ ztd::option_set gen_options()
|
||||||
ztd::option("no-shebang", false, "Don't output shebang"),
|
ztd::option("no-shebang", false, "Don't output shebang"),
|
||||||
ztd::option('J', "json", false, "Output the json structure"),
|
ztd::option('J', "json", false, "Output the json structure"),
|
||||||
ztd::option("\r [Processing]"),
|
ztd::option("\r [Processing]"),
|
||||||
ztd::option('C', "no-cd", false, "Don't cd when doing %include and %resolve"),
|
|
||||||
ztd::option('m', "minimize", false, "Minimize code without changing functionality"),
|
ztd::option('m', "minimize", false, "Minimize code without changing functionality"),
|
||||||
|
ztd::option("minimize-quotes", false, "Remove unnecessary quotes"),
|
||||||
|
ztd::option('C', "no-cd", false, "Don't cd when doing %include and %resolve"),
|
||||||
ztd::option('I', "no-include", false, "Don't resolve %include commands"),
|
ztd::option('I', "no-include", false, "Don't resolve %include commands"),
|
||||||
ztd::option('R', "no-resolve", false, "Don't resolve %resolve commands"),
|
ztd::option('R', "no-resolve", false, "Don't resolve %resolve commands"),
|
||||||
ztd::option("debashify", false, "Attempt to turn a bash-specific script into a POSIX shell script"),
|
ztd::option("debashify", false, "Attempt to turn a bash-specific script into a POSIX shell script"),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue