VimUnDo J߄lHk`k0zNqqd|S* 0000NR _NR5_NRvar escape = require5_NRvar bash = require5_ NRvar bash = require('5_NRbash.escape = f5_NR}5_NR}:5_ NR5_ NR5_ NR 5_ FNRT// he used it in an app that processed millions of commands this way. Here is hoping5_ NR// it works : )5_  FNRF// he used it in an app that processed millions of commands this way. 5_ MNRQ// Simple yet elegant shell escaping. This was proposed by shaver in IRC who says5_NRsays5_NR// saysH// he used it in an app that processed millions of commands this way. We5_NRP// says // he used it in an app that processed millions of commands this way. We5_NRO// says / he used it in an app that processed millions of commands this way. We5_NRN// says he used it in an app that processed millions of commands this way. We5_KNRM// says he used it in an app that processed millions of commands this way. We5_NR5_NR+5_NR,;Command.escapeOptions = function(options, prefix, suffix) {5_NR,8bash.escapeOptions = function(options, prefix, suffix) {5_%NRc$&= args.push(prefix+key+suffix+Command.escape(val));5_NR0,< return (argument+'').replace(/([^0-9a-z-])/g, '\\$1');5_NR0,= return (argument +'').replace(/([^0-9a-z-])/g, '\\$1');5_ 4NR\,> return (argument + '').replace(/([^0-9a-z-])/g, '\\$1');5_! NR , [] .concat(block[key])5_ "!NR + [] .concat(block[key])5_!#""NR!#+" args.push(prefix+key);5_"$#"NR!#+# args.push(prefix +key);5_#%$$NR#%+: args.push(prefix+key+suffix+bash.escape(val));5_$&%$NR#%+; args.push(prefix +key+suffix+bash.escape(val));5_%'&$"NR#%+< args.push(prefix + key+suffix+bash.escape(val));5_&('$$NR#%+= args.push(prefix + key +suffix+bash.escape(val));5_')($+NR#%+> args.push(prefix + key + suffix+bash.escape(val));5_(0)$-NR#%+? args.push(prefix + key + suffix +bash.escape(val));5_)/0(VNR 5_)*0/'VNR5_)+/*NR5_*,+NR5_+-, NR)" options.reduce(function(block) {5_,.-&NR %') }, []);5_-. NR) options .reduce(function(block) {5_NR} var args = []; options = [].concat(options);# options.forEach(function(block) { for (var key in block) { [] .concat(block[key]) .forEach(function(val) {- if (val === null || val === true) {" args.push(prefix+key); } else {= args.push(prefix+key+suffix+Command.escape(val)); } }); } }); return args.join(' ');;5_NR)5_$NR1F// At transloadit we have processed of commands this way now as well.5