aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/main.go b/main.go
index 881f415..af84d0d 100644
--- a/main.go
+++ b/main.go
@@ -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"} {