Skip to content

Commit

Permalink
small bug fix when listing formulae
Browse files Browse the repository at this point in the history
  • Loading branch information
razvanazamfirei committed Apr 8, 2023
1 parent 9fac131 commit 0c22938
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Library/Homebrew/completions/fish.erb
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,10 @@ function __fish_brew_suggest_formulae_all -d 'Lists all available formulae with
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")) }'
else if test -z "$HOMEBREW_NO_INSTALL_FROM_API"
else if test -n "$HOMEBREW_NO_INSTALL_FROM_API"
command ls -1 (brew --prefix)/Library/Taps/homebrew/homebrew-core
else if test -f "$__brew_cache_path"/api/formula_names.txt"
command cat $__brew_cache_path/api/formula_names.txt
else
# fallback on brew formulae if homebrew-core is not tapped
brew formulae
Expand Down
4 changes: 3 additions & 1 deletion completions/fish/brew.fish
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ function __fish_brew_suggest_formulae_all -d 'Lists all available formulae with
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")) }'
else if test -z "$HOMEBREW_NO_INSTALL_FROM_API"
else if test -n "$HOMEBREW_NO_INSTALL_FROM_API"
command ls -1 (brew --prefix)/Library/Taps/homebrew/homebrew-core
else if test -f "$__brew_cache_path"/api/formula_names.txt"
command cat $__brew_cache_path/api/formula_names.txt
else
# fallback on brew formulae if homebrew-core is not tapped
brew formulae
Expand Down

0 comments on commit 0c22938

Please sign in to comment.