diff --git a/README.md b/README.md index c70037f..34f9e21 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,8 @@ Available Commands: version Print version Flags: - -c, --cache only scan directories once, at startup - -f, --filter enable filtering via query parameters + -c, --cache only scan directories once, at startup (incompatible with --filter) + -f, --filter enable filtering via query parameters (incompatible with --cache) -h, --help help for roulette -p, --port uint16 port to listen on (default 8080) -r, --recursive recurse into subdirectories diff --git a/cmd/root.go b/cmd/root.go index ac2bee6..004a215 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -55,8 +55,9 @@ func Execute() { } func init() { - rootCmd.Flags().BoolVarP(&Cache, "cache", "c", false, "only scan directories once, at startup") - rootCmd.Flags().BoolVarP(&Filter, "filter", "f", false, "enable filtering via query parameters") + rootCmd.Flags().BoolVarP(&Cache, "cache", "c", false, "only scan directories once, at startup (incompatible with --filter)") + rootCmd.Flags().BoolVarP(&Filter, "filter", "f", false, "enable filtering via query parameters (incompatible with --cache)") + rootCmd.MarkFlagsMutuallyExclusive("cache", "filter") rootCmd.Flags().Uint16VarP(&Port, "port", "p", 8080, "port to listen on") rootCmd.Flags().BoolVarP(&Recursive, "recursive", "r", false, "recurse into subdirectories") rootCmd.Flags().BoolVarP(&Sort, "sort", "s", false, "enable sorting via query parameters") diff --git a/cmd/version.go b/cmd/version.go index 19bcbf8..6b67020 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -10,7 +10,7 @@ import ( "github.com/spf13/cobra" ) -var Version = "0.20.5" +var Version = "0.20.6" func init() { rootCmd.AddCommand(versionCmd)