Skip to content

Sort help message options by column instead of by row when an invalid command/subcommand is given #6974

@justindho

Description

@justindho

Describe the feature

When running an invalid command, the valid options displayed are sorted by row:

$ aws lambda foo

...

add-permission                           | create-alias                            
create-event-source-mapping              | create-function                         
delete-alias                             | delete-event-source-mapping             
delete-function                          | delete-function-concurrency             
get-account-settings                     | get-alias                               
get-event-source-mapping                 | get-function                            
get-function-configuration               | get-policy                              
invoke                                   | invoke-async                            
list-aliases                             | list-event-source-mappings              
list-functions                           | list-tags                               
list-versions-by-function                | publish-version                         
put-function-concurrency                 | remove-permission                       
tag-resource                             | untag-resource                          
update-alias                             | update-event-source-mapping             
update-function-code                     | update-function-configuration           
help                                    

The feature would, instead, sort the valid options by column:

$ aws lambda foo

...

add-permission                           | list-aliases                            
create-alias                             | list-event-source-mappings              
create-event-source-mapping              | list-functions                          
create-function                          | list-tags                               
delete-alias                             | list-versions-by-function               
delete-event-source-mapping              | publish-version                         
delete-function                          | put-function-concurrency                
delete-function-concurrency              | remove-permission                       
get-account-settings                     | tag-resource                            
get-alias                                | untag-resource                          
get-event-source-mapping                 | update-alias                            
get-function                             | update-event-source-mapping             
get-function-configuration               | update-function-code                    
get-policy                               | update-function-configuration           
invoke                                   | help                                    
invoke-async                             |        

Sorting should work regardless of the value given for ChoicesPerLine.

Use Case

Sorting the valid options for a command/subcommand may read more naturally when sorted by column instead of by row.

Proposed Solution

#3211

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CLI version used

any

Environment details (OS name and version, etc.)

any

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions