Skip to content
This repository was archived by the owner on Nov 18, 2020. It is now read-only.
This repository was archived by the owner on Nov 18, 2020. It is now read-only.

-q does not suppress table headers for list_* commands #273

Closed

Description

@benpollard

With release version 3.7.9 rabbitmqctl -q list_users includes headings for user and tags. It seems counterintuitive to include headings when using a quiet flag. Is this intended behaviour? I imagine this is going to cause issues for people who are parsing the output. As an example, this change is not compatible with the rabbitmq puppet module.

Activity

  1. michaelklishin commented on Nov 16, 2018

    @michaelklishin
    Contributor

    Yes, this is intentional. See #264. -q is used to suppress the banner commands output and @dumbbell and I concluded that a separate flag should control the headers. Not outputting the headers was an unintentional change [in 3.7.0].

    rabbitmqctl list_queues --no-table-headers -q will also omit the headers.

  2. changed the title [-]Rabbitmqctl output change[/-] [+]-q does not suppress table headers for list_* commands[/+] on Nov 16, 2018
  3. lukebakken commented on Nov 16, 2018

    @lukebakken
    Contributor

    Yes, it is intended. -q suppresses informational headers like "Listing queues for vhost / ...". There is an undocumented argument --no-table-headers that will accomplish what you want (rabbitmq/rabbitmq-server@20539a0). We'll be sure to add that to the help output.

  4. michaelklishin commented on Nov 16, 2018

    @michaelklishin
    Contributor

    I agree that this deserves a mention in both --help and the CLI documentation guide.

  5. michaelklishin commented on Nov 21, 2018

    @michaelklishin
    Contributor

    There were (now deleted?) comments in this thread claiming that -q and --no-table-headers aren't supported by list_users. I tried to verify. Here are my findings:

    ./sbin/rabbitmqctl list_users
    Listing users ...
    user	tags
    bunny_reader	[]
    bunny_gem	[]
    alt3	[]
    guest	[administrator]
    temp-user	[management]
    alt-user	[]
    
    ./sbin/rabbitmqctl list_users -q                                                                                                                                                                                                                
    user	tags
    bunny_reader	[]
    bunny_gem	[]
    alt3	[]
    guest	[administrator]
    temp-user	[management]
    alt-user	[]
    
    ./sbin/rabbitmqctl list_users -q --no-table-headers
    bunny_reader	[]
    bunny_gem	[]
    alt3	[]
    guest	[administrator]
    temp-user	[management]
    alt-user	[]
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions