Conversation
|
how about an option Definitely a good idea to allow column filtering though! My first thought on seeing the PR title was how cluttered |
|
It would be nice to support comma-separated list in |
|
This is another one of the things I'd love to get in a CLI style guide (see #12811). I think we should do some form of an output format that can apply to anything. Kubectl supports a few too many options (IMO), but there's surely some inspiration we can take from them:
|
I will remove the Docker also uses Go template: $ docker image list --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.Size}}"
$ docker ps --format "table {{.Names}}\t{{.Ports}}" |
I don't think we need this level of flexibility, but some customisation would be nice. Perhaps we can add generic config to "tsh db ls":
columns: Proxy Name Protocol Description Type AllowedUsers Each call to |
tsh db lstsh db ls -v
52e549b to
801e36e
Compare
* refactor and add --exclude-column * add Database Roles column * add database_roles to json,yaml * remove --exclude-column and refactor databaseTableRow * change slices import
* Add database roles to `tsh db ls -v` (#35582) * refactor and add --exclude-column * add Database Roles column * add database_roles to json,yaml * remove --exclude-column and refactor databaseTableRow * change slices import * update copyright header
Pre-req to
changelog: Added "Database Roles" column to
tsh db ls -vChanges:
tsh db ls -vdatabase_rolestotsh db ls -f json/yamltsh db ls -Rreturns missing "Expires" columnDid some minor refactoring. Might be easier to review each commit separately.
Usage example: