From 844363c7477fe3cd01043cc08ff96aa23511b43f Mon Sep 17 00:00:00 2001 From: Kid <44045911+kidonng@users.noreply.github.com> Date: Fri, 25 Dec 2020 13:55:32 +0800 Subject: [PATCH] Fix description cache path in Fish completion --- completions/fish/brew.fish | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/completions/fish/brew.fish b/completions/fish/brew.fish index c5894b5cb6..c45e595485 100644 --- a/completions/fish/brew.fish +++ b/completions/fish/brew.fish @@ -93,11 +93,9 @@ function __fish_brew_suggest_formulae_all -d 'Lists all available formulae with set -q __brew_cache_path or set -gx __brew_cache_path (brew --cache) - # TODO: Probably drop this since I think that desc_cache.json is no longer generated. Is there a different available cache? - if test -f "$__brew_cache_path/desc_cache.json" - __fish_brew_ruby_parse_json "$__brew_cache_path/desc_cache.json" \ + if test -f "$__brew_cache_path/descriptions.json" + __fish_brew_ruby_parse_json "$__brew_cache_path/descriptions.json" \ '.each{ |k, v| puts([k, v].reject(&:nil?).join("\t")) }' - # backup: (note that it lists only formulae names without descriptions) else brew formulae end