mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 12:04:39 +08:00
complete: Only describe commands if the function exists
This shells out to __fish_describe_command, but if the install is incomplete that will trigger the command-not-found handler.
This commit is contained in:
parent
ebf19c22fd
commit
de13e6f9af
|
@ -977,9 +977,12 @@ impl<'ctx> Completer<'ctx> {
|
|||
return;
|
||||
}
|
||||
|
||||
let lookup_cmd: WString = [L!("__fish_describe_command "), &escape(cmd)]
|
||||
.into_iter()
|
||||
.collect();
|
||||
let lookup_cmd: WString = [
|
||||
L!("functions -q __fish_describe_command && __fish_describe_command "),
|
||||
&escape(cmd),
|
||||
]
|
||||
.into_iter()
|
||||
.collect();
|
||||
|
||||
// First locate a list of possible descriptions using a single call to apropos or a direct
|
||||
// search if we know the location of the whatis database. This can take some time on slower
|
||||
|
|
Loading…
Reference in New Issue
Block a user