File tree Expand file tree Collapse file tree 2 files changed +5
-11
lines changed
tests/snapshots/home/dynamic-env/exhaustive/fish/fish/completions Expand file tree Collapse file tree 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ impl EnvCompleter for Fish {
224224
225225 writeln ! (
226226 buf,
227- r#"complete --keep-order --exclusive --command {bin} --arguments "({var}=fish "' {completer}'" -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))""#
227+ r#"complete --keep-order --exclusive --command {bin} --arguments "({var}=fish {completer} -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))""#
228228 )
229229 }
230230 fn write_complete (
@@ -476,25 +476,19 @@ mod tests {
476476 let script = get_fish_registration ( "completer" ) ;
477477 assert_data_eq ! (
478478 script. trim( ) ,
479- snapbox:: str ![ r#"complete [..] "([..] "' completer'" [..])""# ]
479+ snapbox:: str ![ r#"complete [..] "([..] completer [..])""# ]
480480 ) ;
481481
482482 let script = get_fish_registration ( "/path/completer" ) ;
483483 assert_data_eq ! (
484484 script. trim( ) ,
485- snapbox:: str ![ r#"complete [..] "([..] "' /path/completer'" [..])""# ]
485+ snapbox:: str ![ r#"complete [..] "([..] /path/completer [..])""# ]
486486 ) ;
487487
488- // This case demonstrates the existing bug when handling paths with spaces as described in
489- // https://github.com/clap-rs/clap/issues/6196
490- // The problem shown here is:
491- // * The double quote started at `"(` is closed by the double quote before the path
492- // * Then we have an empty pair of single quotes
493- // * Then we have the _unquoted_ path with a space, which is problematic
494488 let script = get_fish_registration ( "/path with a space/completer" ) ;
495489 assert_data_eq ! (
496490 script. trim( ) ,
497- snapbox:: str ![ r#"complete [..] "([..] "'' /path with a space/completer''" [..])""# ]
491+ snapbox:: str ![ r#"complete [..] "([..] ' /path with a space/completer' [..])""# ]
498492 ) ;
499493 }
500494}
Original file line number Diff line number Diff line change 1- complete --keep-order --exclusive --command exhaustive --arguments " (COMPLETE=fish " ' exhaustive' " -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))"
1+ complete --keep-order --exclusive --command exhaustive --arguments " (COMPLETE=fish exhaustive -- (commandline --current-process --tokenize --cut-at-cursor) (commandline --current-token))"
You can’t perform that action at this time.
0 commit comments