Add default file name to config help output
This is useful for determining where the configuration file is supposed to be.
@@ -17,6 +17,9 @@ limitations under the License.
package config
import (
+ "fmt"
+ "os"
+
cmdutil "github.com/redskyops/k8s-experiment/pkg/redskyctl/util"
"github.com/spf13/cobra"
)
@@ -49,5 +52,8 @@ func NewConfigCommand(f cmdutil.Factory, ioStreams cmdutil.IOStreams) *cobra.Com
cmdutil.CheckErr(NewConfigViewOptions(ioStreams).Run())
}
+ // Add the config file name to the help output
+ cmd.Long = fmt.Sprintf("%s ('%s')", cmd.Long, os.ExpandEnv("$HOME/.redsky"))
+
return cmd
}
