@@ -13,7 +13,6 @@ import (
1313 "fmt"
1414 "io/ioutil"
1515 "os"
16- "strings"
1716
1817 // Caltech Library Packages
1918 "github.com/caltechlibrary/cli"
@@ -116,7 +115,7 @@ func main() {
116115 app .BoolVar (& runInteractive , "repl" , false , "run interactively" )
117116 app .BoolVar (& csvOutput , "csv" , false , "output as CSV or other flat delimiter row" )
118117 app .StringVar (& delimiter , "d,delimiter" , delimiter , "set the delimiter for multi-field csv output" )
119- app .BoolVar (& quote , "quote" , false , "if dilimiter is found in column value add quotes for non-CSV output " )
118+ app .BoolVar (& quote , "quote" , true , "quote strings and JSON notation " )
120119
121120 // Parse Environment and Options
122121 app .Parse ()
@@ -223,7 +222,7 @@ func main() {
223222 cli .ExitOnError (app .Eout , err , quiet )
224223 switch result .(type ) {
225224 case string :
226- if quote == true && strings . Contains ( result .( string ), delimiter ) == true {
225+ if quote == true {
227226 fmt .Fprintf (app .Out , "%q" , result )
228227 } else {
229228 fmt .Fprintf (app .Out , "%s" , result )
0 commit comments