mirror of https://github.com/caddyserver/caddy.git
fileserver: Add command shortcuts `-l` and `-a` (#5854)
This commit is contained in:
parent
88b4fbf244
commit
fa5a579b60
|
@ -55,10 +55,10 @@ respond with a file listing.`,
|
||||||
CobraFunc: func(cmd *cobra.Command) {
|
CobraFunc: func(cmd *cobra.Command) {
|
||||||
cmd.Flags().StringP("domain", "d", "", "Domain name at which to serve the files")
|
cmd.Flags().StringP("domain", "d", "", "Domain name at which to serve the files")
|
||||||
cmd.Flags().StringP("root", "r", "", "The path to the root of the site")
|
cmd.Flags().StringP("root", "r", "", "The path to the root of the site")
|
||||||
cmd.Flags().StringP("listen", "", "", "The address to which to bind the listener")
|
cmd.Flags().StringP("listen", "l", "", "The address to which to bind the listener")
|
||||||
cmd.Flags().BoolP("browse", "b", false, "Enable directory browsing")
|
cmd.Flags().BoolP("browse", "b", false, "Enable directory browsing")
|
||||||
cmd.Flags().BoolP("templates", "t", false, "Enable template rendering")
|
cmd.Flags().BoolP("templates", "t", false, "Enable template rendering")
|
||||||
cmd.Flags().BoolP("access-log", "", false, "Enable the access log")
|
cmd.Flags().BoolP("access-log", "a", false, "Enable the access log")
|
||||||
cmd.Flags().BoolP("debug", "v", false, "Enable verbose debug logs")
|
cmd.Flags().BoolP("debug", "v", false, "Enable verbose debug logs")
|
||||||
cmd.RunE = caddycmd.WrapCommandFuncForCobra(cmdFileServer)
|
cmd.RunE = caddycmd.WrapCommandFuncForCobra(cmdFileServer)
|
||||||
cmd.AddCommand(&cobra.Command{
|
cmd.AddCommand(&cobra.Command{
|
||||||
|
|
Loading…
Reference in New Issue