You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
currentCmd.Flags().BoolVar(&shortWorkspaceOutput, "short", shortWorkspaceOutput, "Print only the name of the workspace, e.g. for integration into the shell prompt")
Copy file name to clipboardExpand all lines: pkg/cliplugins/workspace/plugin/options.go
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -28,8 +28,9 @@ import (
28
28
// Options provides options that will drive the update of the current context
29
29
// on a user's KUBECONFIG based on actions done on KCP workspaces
30
30
typeOptionsstruct {
31
-
KubectlOverrides*clientcmd.ConfigOverrides
32
-
Scopestring
31
+
KubectlOverrides*clientcmd.ConfigOverrides
32
+
Scopestring
33
+
ShortWorkspaceOutputbool
33
34
34
35
genericclioptions.IOStreams
35
36
}
@@ -63,6 +64,8 @@ func (o *Options) BindFlags(cmd *cobra.Command) {
63
64
64
65
cmd.PersistentFlags().StringVar(&o.Scope, "scope", o.Scope, `The 'personal' scope shows only the workspaces you personally own, with the name you gave them at creation.
65
66
The 'all' scope returns all the workspaces you are allowed to see in the organization, with the disambiguated names they have inside the whole organization.`)
67
+
68
+
cmd.PersistentFlags().BoolVar(&o.ShortWorkspaceOutput, "short", o.ShortWorkspaceOutput, "Print only the name of the workspace, e.g. for integration into the shell prompt")
0 commit comments