diff --git a/cmd/flags.go b/cmd/flags.go index 0ffedd35..69c9c9af 100644 --- a/cmd/flags.go +++ b/cmd/flags.go @@ -1,5 +1,5 @@ package cmd -// TrimPathPrefix determines if the output paths should have the input path -// trimmed from the prefix -var trimPathPrefix bool +// noTrimPathPrefix determines if the output paths should +// have the input path trimmed from the prefix +var noTrimPathPrefix bool diff --git a/cmd/folder_list.go b/cmd/folder_list.go index 7cfd3100..1f7ebcf3 100644 --- a/cmd/folder_list.go +++ b/cmd/folder_list.go @@ -17,7 +17,7 @@ var folderListCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { input := vaku.NewPathInput(args[0]) - input.TrimPathPrefix = trimPathPrefix + input.TrimPathPrefix = !noTrimPathPrefix output, err := vgc.FolderList(input) if err != nil { @@ -33,5 +33,5 @@ var folderListCmd = &cobra.Command{ func init() { folderCmd.AddCommand(folderListCmd) - folderListCmd.PersistentFlags().BoolVarP(&trimPathPrefix, "trim-path-prefix", "t", true, "Output paths with the input path trimmed (like Vault CLI)") + folderListCmd.PersistentFlags().BoolVarP(&noTrimPathPrefix, "no-trim-path-prefix", "T", true, "Output full paths instead of paths with the input path trimmed") } diff --git a/cmd/folder_read.go b/cmd/folder_read.go index 1b0c8f68..eb6bee43 100644 --- a/cmd/folder_read.go +++ b/cmd/folder_read.go @@ -16,7 +16,7 @@ var folderReadCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { input := vaku.NewPathInput(args[0]) - input.TrimPathPrefix = trimPathPrefix + input.TrimPathPrefix = !noTrimPathPrefix output, err := vgc.FolderRead(input) if err != nil { @@ -31,5 +31,5 @@ var folderReadCmd = &cobra.Command{ func init() { folderCmd.AddCommand(folderReadCmd) - folderReadCmd.PersistentFlags().BoolVarP(&trimPathPrefix, "trim-path-prefix", "t", true, "Output paths with the input path trimmed (like Vault CLI)") + folderReadCmd.PersistentFlags().BoolVarP(&noTrimPathPrefix, "no-trim-path-prefix", "T", true, "Output full paths instead of paths with the input path trimmed") } diff --git a/cmd/folder_search.go b/cmd/folder_search.go index 22a12ed0..67d1bcfd 100644 --- a/cmd/folder_search.go +++ b/cmd/folder_search.go @@ -16,7 +16,7 @@ var folderSearchCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { input := vaku.NewPathInput(args[0]) - input.TrimPathPrefix = trimPathPrefix + input.TrimPathPrefix = !noTrimPathPrefix output, err := vgc.FolderSearch(input, args[1]) if err != nil { @@ -31,5 +31,5 @@ var folderSearchCmd = &cobra.Command{ func init() { folderCmd.AddCommand(folderSearchCmd) - folderSearchCmd.PersistentFlags().BoolVarP(&trimPathPrefix, "trim-path-prefix", "t", true, "Output paths with the input path trimmed (like Vault CLI)") + folderSearchCmd.PersistentFlags().BoolVarP(&noTrimPathPrefix, "no-trim-path-prefix", "T", true, "Output full paths instead of paths with the input path trimmed") } diff --git a/cmd/path_list.go b/cmd/path_list.go index b4a3844c..b84bcdf0 100644 --- a/cmd/path_list.go +++ b/cmd/path_list.go @@ -16,7 +16,7 @@ var pathListCmd = &cobra.Command{ Run: func(cmd *cobra.Command, args []string) { input := vaku.NewPathInput(args[0]) - input.TrimPathPrefix = trimPathPrefix + input.TrimPathPrefix = !noTrimPathPrefix output, err := vgc.PathList(input) if err != nil { @@ -31,5 +31,5 @@ var pathListCmd = &cobra.Command{ func init() { pathCmd.AddCommand(pathListCmd) - pathListCmd.PersistentFlags().BoolVarP(&trimPathPrefix, "trim-path-prefix", "t", true, "Output paths with the input path trimmed (like Vault CLI)") + pathListCmd.PersistentFlags().BoolVarP(&noTrimPathPrefix, "no-trim-path-prefix", "T", true, "Output full paths instead of paths with the input path trimmed") }