Smarter behaviour when piping data in with one argument

This commit is contained in:
Mike Farah
2022-01-27 10:18:46 +11:00
parent c3d815998a
commit fc276ff450
4 changed files with 18 additions and 2 deletions
+2 -2
View File
@@ -14,13 +14,13 @@ func New() *cobra.Command {
Short: "yq is a lightweight and portable command-line YAML processor.",
Long: `yq is a portable command-line YAML processor (https://github.com/mikefarah/yq/)
See https://mikefarah.gitbook.io/yq/ for detailed documentation and examples.`,
RunE: func(cmd *cobra.Command, args []string) error {
if version {
cmd.Print(GetVersionDisplay())
return nil
}
cmd.Println(cmd.UsageString())
return nil
return evaluateSequence(cmd, args)
},
PersistentPreRun: func(cmd *cobra.Command, args []string) {