@@ -182,7 +182,7 @@ $ go install -tags all github.com/xo/usql@master
182
182
` usql ` works with all Go standard library compatible SQL drivers supported by
183
183
[ ` github.com/xo/dburl ` ] [ dburl ] .
184
184
185
- The list of drivers that ` usql ` was built with can be displayed using the
185
+ The list of drivers that ` usql ` was built with can be displayed with the
186
186
[ ` \drivers ` command] [ commands ] :
187
187
188
188
``` sh
@@ -338,7 +338,7 @@ associated database, scheme / build tag, and scheme aliases:
338
338
</i >
339
339
</p >
340
340
341
- Any of the protocol schemes/aliases shown above can be used in conjunction when
341
+ Any of the protocol schemes/aliases above can be used in conjunction when
342
342
connecting to a database via the command-line or with the [ ` \connect ` and
343
343
` \copy ` commands] [ commands ] :
344
344
@@ -422,7 +422,7 @@ connection strings (aka "data source name" or DSNs) have the same parsing rules
422
422
as URLs, and can be passed to ` usql ` via command-line, or to the [ ` \connect ` ,
423
423
` \c ` , and ` \copy ` commands] [ commands ] .
424
424
425
- Database connections can be named/ defined via [ the ` \cset ` command] [ connection-vars ]
425
+ Database connections can be defined with [ the ` \cset ` command] [ connection-vars ]
426
426
or in [ the ` config.yaml ` configuration file] [ config ] .
427
427
428
428
#### Database Connection Strings
@@ -487,10 +487,10 @@ If a URL does not have a `driver:` scheme, `usql` will check if it is a path on
487
487
disk. If the path exists, ` usql ` will attempt to use an appropriate database
488
488
driver to open the path.
489
489
490
- When the path is a Unix Domain Socket, ` usql ` will attempt to open it using the
490
+ When the path is a Unix Domain Socket, ` usql ` will attempt to open it with the
491
491
MySQL driver. When the path is a directory, ` usql ` will attempt to open it
492
492
using the PostgreSQL driver. And, lastly, when the path is a regular file,
493
- ` usql ` will attempt to open the file using the SQLite3 driver .
493
+ ` usql ` will attempt to open the file using the SQLite3 or DuckDB drivers .
494
494
495
495
#### Driver Defaults
496
496
@@ -549,8 +549,8 @@ $ usql ca://
549
549
# connect to a sqlite database that exists on disk
550
550
$ usql dbname.sqlite3
551
551
552
- # Note: when connecting to a SQLite database, if the "< driver> ://" or
553
- # "< driver> :" scheme/alias is omitted, the file must already exist on disk.
552
+ # Note: when connecting to a SQLite database, if the "driver://" or
553
+ # "driver:" scheme/alias is omitted, the file must already exist on disk.
554
554
#
555
555
# if the file does not yet exist, the URL must incorporate file:, sq:, sqlite3:,
556
556
# or any other recognized sqlite3 driver alias to force usql to create a new,
@@ -585,7 +585,7 @@ Debug=0
585
585
CommLog=1
586
586
UsageCount=1
587
587
588
- # connect to db2, postgres databases using above odbc config
588
+ # connect to db2, postgres databases using odbc config above
589
589
$ usql odbc+DB2://user:pass@localhost/dbname
590
590
$ usql odbc+PostgreSQL+ANSI://user:pass@localhost/dbname? TraceFile=/path/to/trace.log
591
591
```
@@ -742,7 +742,7 @@ Operating System
742
742
\timing [on|off] toggle timing of commands
743
743
744
744
Variables
745
- \prompt [-TYPE] < VAR> [PROMPT] prompt user to set variable
745
+ \prompt [-TYPE] VAR [PROMPT] prompt user to set variable
746
746
\set [NAME [VALUE]] set internal variable, or list all if no parameters
747
747
\unset NAME unset (delete) internal variable
748
748
```
@@ -793,8 +793,8 @@ connections:
793
793
database: free
794
794
` ` `
795
795
796
- Defined ` connections:` can be used on the command-line with with ` \c onnect` ,
797
- ` \c ` , ` \ c opy` , and [other commands][commands]:
796
+ Defined ` connections:` can be used on the command-line with ` \c onnect` , ` \c ` ,
797
+ ` \c opy` , and [other commands][commands]:
798
798
799
799
` ` ` sh
800
800
$ usql my_godror_conn
@@ -814,17 +814,15 @@ init: |
814
814
\s et SYNTAX_HL_STYLE paraiso-dark
815
815
` ` `
816
816
817
- The ` init:` string is read at startup and will executed prior to any ` -c` /
817
+ The ` init:` script is commonly used to set [environment variables][variables]
818
+ or other configuration, and can be disabled on the command-line using the
819
+ ` --no-init` / ` -X` flag. The script will be executed prior to any ` -c` /
818
820
` --command` / ` -f` / ` --file` flag and before starting the interactive
819
821
interpreter.
820
822
821
- The initialization script is commonly used to set startup environment variables
822
- and settings. The execution of the init script can be disabled on the
823
- command-line using the ` --no-init` / ` -X` flag.
823
+ # #### Other Options
824
824
825
- # #### Other Config Options
826
-
827
- Please see [` contrib/config.yaml` ](contrib/config.yaml) for examples of other
825
+ Please see [` contrib/config.yaml` ](contrib/config.yaml) for an overview of
828
826
available configuration options.
829
827
830
828
# ### Variables
@@ -835,15 +833,14 @@ available configuration options.
835
833
836
834
# #### Runtime Variables
837
835
838
- Client-side runtime variables are managed with the ` \s et` and ` \u nset`
839
- [commands][commands]:
836
+ Runtime variables are managed with the ` \s et` and ` \u nset` [commands][commands]:
840
837
841
838
` ` ` sh
842
839
(not connected)=> \u nset FOO
843
840
(not connected)=> \s et FOO bar
844
841
` ` `
845
842
846
- Runtime variables can be shown with ` \s et` :
843
+ Runtime variables can be displayed with ` \s et` :
847
844
848
845
` ` ` sh
849
846
(not connected)=> \s et
@@ -875,7 +872,7 @@ pg:booktest@localhost=> select * from :TBLNAME where :"COLNAME" = :'FOO'
875
872
```
876
873
877
874
The query buffer and interpolated values can be displayed with `\p` and
878
- `\print`, or the raw query buffer can be shown with `\raw`:
875
+ `\print`, or the raw query buffer can be displayed with `\raw`:
879
876
880
877
```sh
881
878
pg:booktest@localhost-> \p
@@ -919,7 +916,7 @@ pg:postgres@localhost=>
919
916
Connection variables are not interpolated into queries. See the [configuration
920
917
section for information on defining persistent connection variables][config].
921
918
922
- Connection variables can be shown through `\cset`:
919
+ Connection variables can be displayed with `\cset`:
923
920
924
921
```sh
925
922
(not connected)=> \cset
@@ -928,8 +925,8 @@ my_conn = 'postgres://user:pass@localhost'
928
925
929
926
##### Display Formatting (Print) Variables
930
927
931
- Client-side display formatting variables can be set using `\pset` and [via
932
- other commands][commands]:
928
+ Display formatting variables can be set using `\pset` and [other
929
+ commands][commands]:
933
930
934
931
```sh
935
932
(not connected)=> \pset time Kitchen
@@ -938,7 +935,7 @@ Time display is "Kitchen" ("3:04PM").
938
935
Output format is unaligned.
939
936
```
940
937
941
- Display formatting variables and settings can be shown through `\pset`:
938
+ Display formatting variables can be displayed with `\pset`:
942
939
943
940
```sh
944
941
(not connected)=> \pset
@@ -947,11 +944,12 @@ time Kitchen
947
944
948
945
##### Other Variables
949
946
950
- Runtime behavior can be modified through special variables, such as
951
- [enabling/disabling syntax highlighting][highlighting].
947
+ Runtime behavior, such as [enabling or disabling syntax
948
+ highlighting][highlighting] can be modified through special variables like
949
+ [`SYNTAX_HL`][highlighting].
952
950
953
- Additional information on setting/using variables and the recognized special
954
- variables can be shown with `\? variables `:
951
+ Use the `\? variables` [command][commands] to display variable help information
952
+ and to list special variables recognized by `usql `:
955
953
956
954
```sh
957
955
(not connected)=> \? variables
@@ -991,7 +989,8 @@ and writes to a destination database DSN:
991
989
` ` `
992
990
993
991
As demonstrated above, the ` \c opy` command does not require being connected to
994
- a database, and will not impact or alter the current open database connection.
992
+ a database, and will not modify or change the current open database connection
993
+ or state.
995
994
996
995
Any valid URL or DSN name maybe used for the source and destination database:
997
996
@@ -1222,7 +1221,7 @@ Command completion can be canceled with `<Control-C>`.
1222
1221
1223
1222
Some databases support time/date columns that [support formatting][go-time]. By
1224
1223
default, ` usql` formats time/date columns as [RFC3339Nano][go-time], and can be
1225
- set using ` \p set time < FORMAT> ` :
1224
+ set using ` \p set time FORMAT` :
1226
1225
1227
1226
` ` ` sh
1228
1227
$ usql pg://
@@ -1457,9 +1456,9 @@ additional [SQLite3 build tags (see: `build.sh`)](build.sh).
1457
1456
1458
1457
### macOS
1459
1458
1460
- The recommended installation method on macOS is [via `brew` (see above) ][via Homebrew]
1461
- due to the way library dependencies for the `sqlite3` driver are done on macOS.
1462
- If the following (or similar) error is encountered when attempting to run `usql`:
1459
+ The recommended installation method on macOS is [via `brew`][via Homebrew] due
1460
+ to the way library dependencies for the `sqlite3` driver are done on macOS. If
1461
+ the following (or similar) error is encountered when attempting to run `usql`:
1463
1462
1464
1463
```sh
1465
1464
$ usql
0 commit comments