From 0ad5e762e0383dc75380b741bf6924d7c52fb111 Mon Sep 17 00:00:00 2001 From: juanvallejo Date: Wed, 31 Aug 2016 14:32:29 -0400 Subject: [PATCH] fix oc describe suggestion in oc rsh output --- pkg/cmd/cli/cli.go | 2 +- pkg/cmd/cli/cmd/rsh.go | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/cmd/cli/cli.go b/pkg/cmd/cli/cli.go index 598ddab1f27f..54a92dcaca67 100644 --- a/pkg/cmd/cli/cli.go +++ b/pkg/cmd/cli/cli.go @@ -140,7 +140,7 @@ func NewCommandCLI(name, fullName string, in io.Reader, out, errout io.Writer) * Message: "Troubleshooting and Debugging Commands:", Commands: []*cobra.Command{ cmd.NewCmdLogs(cmd.LogsRecommendedName, fullName, f, out), - cmd.NewCmdRsh(cmd.RshRecommendedName, fullName, f, in, out, errout), + cmd.NewCmdRsh(fullName, cmd.RshRecommendedName, fullName, f, in, out, errout), rsync.NewCmdRsync(rsync.RsyncRecommendedName, fullName, f, out, errout), cmd.NewCmdPortForward(fullName, f, out, errout), cmd.NewCmdDebug(fullName, f, in, out, errout), diff --git a/pkg/cmd/cli/cmd/rsh.go b/pkg/cmd/cli/cmd/rsh.go index 30291e11059e..8fe31fa803e2 100644 --- a/pkg/cmd/cli/cmd/rsh.go +++ b/pkg/cmd/cli/cmd/rsh.go @@ -57,7 +57,7 @@ type RshOptions struct { } // NewCmdRsh returns a command that attempts to open a shell session to the server. -func NewCmdRsh(name string, parent string, f *clientcmd.Factory, in io.Reader, out, err io.Writer) *cobra.Command { +func NewCmdRsh(fullName string, name string, parent string, f *clientcmd.Factory, in io.Reader, out, err io.Writer) *cobra.Command { options := &RshOptions{ ForceTTY: false, DisableTTY: false, @@ -71,7 +71,8 @@ func NewCmdRsh(name string, parent string, f *clientcmd.Factory, in io.Reader, o Stdin: true, }, - Executor: &kubecmd.DefaultRemoteExecutor{}, + FullCmdName: fullName, + Executor: &kubecmd.DefaultRemoteExecutor{}, }, }