diff --git a/cmd/fs/ls.go b/cmd/fs/ls.go index d236024c..bdbc94d8 100644 --- a/cmd/fs/ls.go +++ b/cmd/fs/ls.go @@ -11,7 +11,7 @@ import ( // lsCmd represents the ls command var lsCmd = &cobra.Command{ - Use: "ls", + Use: "ls ", Short: "Lists files", Long: `Lists files`, Args: cobra.ExactArgs(1), @@ -21,6 +21,7 @@ var lsCmd = &cobra.Command{ if err != nil { panic(err) } + // TODO: output formatting: JSON, CSV, tables and default for _, v := range files { fmt.Printf("[-] %s (%d, %v)\n", v.Path, v.FileSize, v.IsDir) } @@ -28,15 +29,7 @@ var lsCmd = &cobra.Command{ } func init() { + // TODO: pietern: conditionally register commands + // fabianj: don't do it fsCmd.AddCommand(lsCmd) - - // Here you will define your flags and configuration settings. - - // Cobra supports Persistent Flags which will work for this command - // and all subcommands, e.g.: - // lsCmd.PersistentFlags().String("foo", "", "A help for foo") - - // Cobra supports local flags which will only run when this command - // is called directly, e.g.: - // lsCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") } diff --git a/cmd/init/init.go b/cmd/init/init.go index ca4b65de..5b74a037 100644 --- a/cmd/init/init.go +++ b/cmd/init/init.go @@ -48,6 +48,7 @@ var initCmd = &cobra.Command{ prj.Isolation = project.Soft }}, }}, + // DBR selection // Choice{"cloud", "Cloud", Answers{ // {"AWS", "Amazon Web Services", nil}, // {"Azure", "Microsoft Azure Cloud", nil}, diff --git a/cmd/root/root.go b/cmd/root/root.go index 3a455bd7..18314b1c 100644 --- a/cmd/root/root.go +++ b/cmd/root/root.go @@ -54,5 +54,6 @@ func Execute() { } func init() { + // flags available for every child command RootCmd.PersistentFlags().BoolVarP(&Verbose, "verbose", "v", false, "print debug logs") }