File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def completion_data(with_version: true)
2929 end
3030 end
3131
32- commands . each do |command |
32+ public_commands . each do |command |
3333 result . merge! command . completion_data ( with_version : false )
3434 end
3535
@@ -73,7 +73,7 @@ def completion_words(with_version: false)
7373 trivial_flags = %w[ --help -h ]
7474 trivial_flags += %w[ --version -v ] if with_version
7575 all = (
76- command_aliases + trivial_flags +
76+ public_command_aliases + trivial_flags +
7777 completion_flag_names + completion_allowed_args
7878 )
7979
Original file line number Diff line number Diff line change @@ -223,6 +223,11 @@ def public_commands
223223 commands . reject ( &:private )
224224 end
225225
226+ # Returns a full list of the public Command names and aliases combined
227+ def public_command_aliases
228+ public_commands . map ( &:aliases ) . flatten
229+ end
230+
226231 # Returns only environment variables that are not private
227232 def public_environment_variables
228233 environment_variables . reject ( &:private )
You can’t perform that action at this time.
0 commit comments