Skip to content
Myr

Use file_stem instead of file_name for command for completions

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thayne McCombs · committed by Thayne McCombs · parent 38cdeb0 · Browse files · 2 files+3 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Fixes: #1177

Diff stats

2 files+3 added−2 removed

  • other:+3 added−2 removed

2 files+3 added−2 removed

modified:src/main.rs+1 added-1 removed
95 unmodified lines
96 let first_arg = env::args().next();97 let program_name = first_arg98 .as_ref()99 .map(Path::new)100 .and_then(|path| path.file_name())100 .and_then(|path| path.file_stem())101 .and_then(|file| file.to_str())102 .unwrap_or("fd");103 let mut cmd = Opts::command();104 cmd.build();
341 unmodified lines
modified:CHANGELOG.md+2 added-1 removed
9 unmodified lines
101112## Bugfixes1314- Use fd instead of fd.exe for Powershell completions (when completions are generated on windows)151617## Other18191820# v8.5.32122## Bugfixes23
643 unmodified lines