Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

client: names in compact output when listing resources #1443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flxzt
Copy link
Contributor

@flxzt flxzt commented Jul 15, 2024

Description

This adds that resources names are printed in the compact output of the labgrid-client resources command.

For example, instead of:

exporter-01/usbhub-p01/NetworkSerialPort
exporter-01/usbhub-p01/NetworkSerialPort

the output becomes

exporter-01/usbhub-p01/NetworkSerialPort[/modbus]
exporter-01/usbhub-p01/NetworkSerialPort[/serial-115200]

which makes it easier to differentiate between resources that have the same class.

The alternative would be to enable verbose printing with labgrid-client -v resources, but that adds a lot of other information and makes is quite hard to pick out the name quickly.

At least in my experience the resource name is the only info that I need 95% of the time, so I think it would be beneficial to add it to the default output.

What do you think?

  • PR has been tested

@Bastian-Krause
Copy link
Member

Sounds good. Is there a special reason for the square brackets? I would just drop them, so the match can be copy & pasted into labgrid-client add-match <match> directly.

@flxzt
Copy link
Contributor Author

flxzt commented Jul 18, 2024

I went with the brackets because they indicate that the name is optional when adding as a match and for consistency to the verbose output.

I don't have a strong opinion about either, should the verbose output be changed as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants