diff options
author | Joop Kiefte <ikojba@gmail.com> | 2023-09-28 01:48:12 +0100 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2023-09-28 01:48:12 +0100 |
commit | ca6e7dab2012a817a1d376e708107d3ba4e51b88 (patch) | |
tree | 97da82350a2ca2612150fbe3f714cf2fc3403501 | |
parent | 838f064991a6868406b4a96167cec201f910f4fa (diff) |
Correct extension bug
-rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -142,7 +142,7 @@ func ReadTableNames() { func RunSQL(query, table string) error { // Create a temporary file to open in visidata - f, err := os.CreateTemp("", "debby-*.sql") + f, err := os.CreateTemp("", "debby-*.csv") if err != nil { return err } @@ -161,6 +161,7 @@ func RunSQL(query, table string) error { // If table is not empty, save the file to the table if table != "" { + fmt.Println("Saving to table...") err = SaveToTable(table, f.Name()) if err != nil { return err @@ -172,7 +173,7 @@ func RunSQL(query, table string) error { } func OpenVisidata(args ...string) { - vdcmd := os.Getenv("EDITOR") + vdcmd := "echo No visidata found, trying to run: vd " once.Do(func() { // run with --version and check if it returns saul.pw/VisiData, if not try the same with visidata instead for _, cmd := range []string{"vd", "visidata"} { |