mirror of
https://github.com/sharkdp/fd
synced 2024-10-02 22:13:31 +00:00
Merge pull request #1178 from tmccombs/windows-completion-fix
Use file_stem instead of file_name for command for completions
This commit is contained in:
commit
db2590dca5
|
@ -11,11 +11,12 @@
|
||||||
|
|
||||||
## Bugfixes
|
## Bugfixes
|
||||||
|
|
||||||
|
- Use fd instead of fd.exe for Powershell completions (when completions are generated on windows)
|
||||||
|
|
||||||
|
|
||||||
## Other
|
## Other
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# v8.5.3
|
# v8.5.3
|
||||||
|
|
||||||
## Bugfixes
|
## Bugfixes
|
||||||
|
|
|
@ -97,7 +97,7 @@ fn print_completions(shell: clap_complete::Shell) -> Result<ExitCode> {
|
||||||
let program_name = first_arg
|
let program_name = first_arg
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map(Path::new)
|
.map(Path::new)
|
||||||
.and_then(|path| path.file_name())
|
.and_then(|path| path.file_stem())
|
||||||
.and_then(|file| file.to_str())
|
.and_then(|file| file.to_str())
|
||||||
.unwrap_or("fd");
|
.unwrap_or("fd");
|
||||||
let mut cmd = Opts::command();
|
let mut cmd = Opts::command();
|
||||||
|
|
Loading…
Reference in a new issue