Skip to content

Commit

Permalink
feat: add config shorthand (#210)
Browse files Browse the repository at this point in the history
Signed-off-by: lvlcn-t <75443136+lvlcn-t@users.noreply.github.com>
  • Loading branch information
lvlcn-t authored Oct 16, 2024
1 parent fd9c019 commit 120b24c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func NewCmdRoot(version string) *cobra.Command {
initConfig(cfgFile)
})

rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.sparrow.yaml)")
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is $HOME/.sparrow.yaml)")

return rootCmd
}
Expand Down
2 changes: 1 addition & 1 deletion docs/sparrow.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The check results are exposed via an API.
### Options

```
--config string config file (default is $HOME/.sparrow.yaml)
-c, --config string config file (default is $HOME/.sparrow.yaml)
-h, --help help for sparrow
```

Expand Down
2 changes: 1 addition & 1 deletion docs/sparrow_run.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sparrow run [flags]
### Options inherited from parent commands

```
--config string config file (default is $HOME/.sparrow.yaml)
-c, --config string config file (default is $HOME/.sparrow.yaml)
```

### SEE ALSO
Expand Down

0 comments on commit 120b24c

Please sign in to comment.