Skip to content

Commit

Permalink
fixup! Remove fish command completions for excluded commands
Browse files Browse the repository at this point in the history
Co-authored-by: Markus Reiter <[email protected]>
  • Loading branch information
jaminthorns and reitermarkus authored Nov 20, 2024
1 parent feeb95e commit f4c95a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Library/Homebrew/completions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,10 +304,10 @@ def self.generate_fish_subcommand_completion(command)
return unless command_gets_completions? command

command_description = format_description Commands.command_description(command, short: true), fish: true
lines = []

unless COMPLETIONS_EXCLUSION_LIST.include?(command)
lines += ["__fish_brew_complete_cmd '#{command}' '#{command_description}'"]
lines = if COMPLETIONS_EXCLUSION_LIST.include?(command)
[]
else
["__fish_brew_complete_cmd '#{command}' '#{command_description}'"]
end

options = command_options(command).sort.filter_map do |opt, desc|
Expand Down

0 comments on commit f4c95a5

Please sign in to comment.