diff options
Diffstat (limited to 'commands/convert.go')
-rw-r--r-- | commands/convert.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/commands/convert.go b/commands/convert.go index c81ec792a..4e1ceb7d1 100644 --- a/commands/convert.go +++ b/commands/convert.go @@ -46,6 +46,7 @@ to use JSON for the front matter.`, return c.convertContents(metadecoders.JSON) }, withc: func(cmd *cobra.Command, r *rootCommand) { + cmd.ValidArgsFunction = cobra.NoFileCompletions }, }, &simpleCommand{ @@ -57,6 +58,7 @@ to use TOML for the front matter.`, return c.convertContents(metadecoders.TOML) }, withc: func(cmd *cobra.Command, r *rootCommand) { + cmd.ValidArgsFunction = cobra.NoFileCompletions }, }, &simpleCommand{ @@ -68,6 +70,7 @@ to use YAML for the front matter.`, return c.convertContents(metadecoders.YAML) }, withc: func(cmd *cobra.Command, r *rootCommand) { + cmd.ValidArgsFunction = cobra.NoFileCompletions }, }, }, @@ -108,6 +111,7 @@ func (c *convertCommand) Init(cd *simplecobra.Commandeer) error { See convert's subcommands toJSON, toTOML and toYAML for more information.` cmd.PersistentFlags().StringVarP(&c.outputDir, "output", "o", "", "filesystem path to write files to") + _ = cmd.MarkFlagDirname("output") cmd.PersistentFlags().BoolVar(&c.unsafe, "unsafe", false, "enable less safe operations, please backup first") cmd.RunE = nil |