mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
Improve UX by not providing yarn completions if no input
Otherwise, the interface would hang while fish processed the output of `all-the-package-names` and then would ultimately not show any results anyhow.
This commit is contained in:
parent
34e104ca35
commit
848ca1c1cc
1 changed files with 4 additions and 1 deletions
|
@ -23,8 +23,11 @@ function __yarn_filtered_list_packages
|
|||
return
|
||||
end
|
||||
|
||||
all-the-package-names | string match -er -- "(?:\\b|_)"(commandline -ct |
|
||||
# Do not provide any completions if nothing has been entered yet
|
||||
if string match -r . (commandline -ct)
|
||||
all-the-package-names | string match -er -- "(?:\\b|_)"(commandline -ct |
|
||||
string escape --style=regex) | head -n1000
|
||||
end
|
||||
end
|
||||
|
||||
function __yarn_find_package_json
|
||||
|
|
Loading…
Reference in a new issue