V3 is in the works

This commit is contained in:
2022-04-20 16:22:43 -05:00
parent 7cc06eeddc
commit 492e3b9547
11 changed files with 458 additions and 32 deletions

View File

@@ -23,6 +23,7 @@ var rootCmd = &cobra.Command{
return errors.New("No database given.")
}
viper.Set("dbs", args)
viper.Set("dbidx", 0)
if err := ui.NewUi().Start(); err != nil {
return err
}
@@ -40,7 +41,7 @@ func Execute() {
}
func init() {
rootCmd.Flags().BoolP("readonly", "ro", false, "Open database in read only mode")
rootCmd.Flags().BoolP("readonly", "r", false, "Open database in read only mode")
viper.BindPFlag("readonly", rootCmd.Flags().Lookup("readonly"))
rootCmd.Flags().Bool("no-value", false, "Do not output values in the left pane")
viper.BindPFlag("no-value", rootCmd.Flags().Lookup("no-value"))
@@ -48,7 +49,3 @@ func init() {
viper.BindPFlag("timeout", rootCmd.Flags().Lookup("timeout"))
viper.Set("version", AppVersion)
}
func printUsage() {
}