Skip to content

Commit db2590d

Browse files
authored
Merge pull request #1178 from tmccombs/windows-completion-fix
Use file_stem instead of file_name for command for completions
2 parents 38cdeb0 + 64e6424 commit db2590d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
## Bugfixes
1313

14+
- Use fd instead of fd.exe for Powershell completions (when completions are generated on windows)
1415

15-
## Other
1616

17+
## Other
1718

1819

1920
# v8.5.3

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ fn print_completions(shell: clap_complete::Shell) -> Result<ExitCode> {
9797
let program_name = first_arg
9898
.as_ref()
9999
.map(Path::new)
100-
.and_then(|path| path.file_name())
100+
.and_then(|path| path.file_stem())
101101
.and_then(|file| file.to_str())
102102
.unwrap_or("fd");
103103
let mut cmd = Opts::command();

0 commit comments

Comments
 (0)