Fix CLI namespace commands (#8315)

* Fix namespace commands help

* Fix useless prediction for namespace commands

* Add namespace prediction capability
This commit is contained in:
Daniel Spangenberg
2020-02-09 19:38:39 +01:00
committed by GitHub
parent 9b1e144985
commit 75461a6522
5 changed files with 49 additions and 10 deletions

View File

@@ -21,11 +21,7 @@ func (c *NamespaceLookupCommand) Synopsis() string {
func (c *NamespaceLookupCommand) Help() string {
helpText := `
Usage: vault namespace create [options] PATH
Create a child namespace. The namespace created will be relative to the
namespace provided in either the VAULT_NAMESPACE environment variable or
-namespace CLI flag.
Usage: vault namespace lookup [options] PATH
Get information about the namespace of the locally authenticated token:
@@ -45,7 +41,7 @@ func (c *NamespaceLookupCommand) Flags() *FlagSets {
}
func (c *NamespaceLookupCommand) AutocompleteArgs() complete.Predictor {
return c.PredictVaultFolders()
return c.PredictVaultNamespaces()
}
func (c *NamespaceLookupCommand) AutocompleteFlags() complete.Flags {