File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 340340 return cmd . name + ' ' + cmd . args . map ( function ( arg , i ) {
341341 if ( cmd . args_quotes [ i ] ) {
342342 var quote = cmd . args_quotes [ i ] ;
343- return quote + unparse ( arg ) + quote ;
343+ var result = unparse ( arg ) ;
344+ if ( quote === '"' && result . match ( / \\ ' / ) ) {
345+ result = result . replace ( / \\ ' / g, "'" ) ;
346+ }
347+ return quote + result + quote ;
344348 }
345349 if ( typeof arg === 'string' ) {
346350 return arg . replace ( / / g, '\\ ' ) ;
392396 if ( single_command ( commands ) ) {
393397 var cmd = commands [ 0 ] ;
394398 if ( is_function ( interpreter ) ) {
395- return interpreter . call ( term , stringify ( cmd ) , term ) ;
399+ return interpreter . call ( term , command , term ) ;
396400 } else if ( is_function ( interpreter [ cmd . name ] ) ) {
397401 return interpreter [ cmd . name ] . apply ( term , cmd . args ) ;
398402 } else if ( $ . isPlainObject ( interpreter [ cmd . name ] ) ) {
You can’t perform that action at this time.
0 commit comments