2017-04-13 21:55:49 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2017-07-23 12:21:03 +00:00
|
|
|
|
|
|
|
"github.com/restic/restic/internal/options"
|
2017-04-13 21:55:49 +00:00
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
var optionsCmd = &cobra.Command{
|
|
|
|
Use: "options",
|
2017-09-11 16:32:44 +00:00
|
|
|
Short: "Print list of extended options",
|
2017-04-13 21:55:49 +00:00
|
|
|
Long: `
|
|
|
|
The "options" command prints a list of extended options.
|
2019-11-05 06:03:38 +00:00
|
|
|
|
|
|
|
EXIT STATUS
|
|
|
|
===========
|
|
|
|
|
|
|
|
Exit status is 0 if the command was successful, and non-zero if there was any error.
|
2017-04-13 21:55:49 +00:00
|
|
|
`,
|
2017-08-06 19:02:16 +00:00
|
|
|
Hidden: true,
|
|
|
|
DisableAutoGenTag: true,
|
2017-04-13 21:55:49 +00:00
|
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
|
|
fmt.Printf("All Extended Options:\n")
|
|
|
|
for _, opt := range options.List() {
|
|
|
|
fmt.Printf(" %-15s %s\n", opt.Namespace+"."+opt.Name, opt.Text)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
cmdRoot.AddCommand(optionsCmd)
|
|
|
|
}
|