Skip to content

Commit

Permalink
Update docs to mention custom-columns
Browse files Browse the repository at this point in the history
  • Loading branch information
clarku committed Feb 9, 2024
1 parent 52c8c00 commit 27ce75d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/get/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ var yamlData []byte

var GetCmd = &cobra.Command{
Use: "get",
Short: "Get kubernetes/openshift object in tabular format or wide|yaml|json|jsonpath.",
Short: "Get kubernetes/openshift object in tabular format or wide|yaml|json|jsonpath|custom-columns.",
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
cmd.Help()
Expand Down Expand Up @@ -117,7 +117,7 @@ func init() {
GetCmd.PersistentFlags().BoolVar(&vars.NoHeaders, "no-headers", false, "When using the default or custom-column output format, don't print headers (default print headers).")
GetCmd.PersistentFlags().BoolVar(&vars.ShowManagedFields, "show-managed-fields", false, "If true, show the managedFields when printing objects in JSON or YAML format.")
GetCmd.PersistentFlags().BoolVarP(&vars.ShowLabelsBoolVar, "show-labels", "", false, "When printing, show all labels as the last column (default hide labels column)")
GetCmd.PersistentFlags().StringVarP(&vars.OutputStringVar, "output", "o", "", "Output format. One of: json|yaml|wide|jsonpath=...")
GetCmd.PersistentFlags().StringVarP(&vars.OutputStringVar, "output", "o", "", "Output format. One of: json|yaml|wide|jsonpath|custom-columns=...")
GetCmd.PersistentFlags().StringVarP(&vars.LabelSelectorStringVar, "selector", "l", "", "selector (label query) to filter on, supports '=', '==', and '!='.(e.g. -l key1=value1,key2=value2)")
}

Expand Down
1 change: 1 addition & 0 deletions docs/subcmds/get.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ omc get pod my-pod -o yaml # Get a pod's YAML
| `-o=name` | Print only the resource name and nothing else |
| `-o=wide` | Output in the plain-text format with any additional information, and for pods, the node name is included |
| `-o=yaml` | Output a YAML formatted API object |
| `-o=custom-columns` | Allows a user to customise the fields that are output and their corresponding header names |

0 comments on commit 27ce75d

Please sign in to comment.