@@ -770,15 +770,15 @@ always appreciated][contributing]!
770
770
771
771
# ### Configuration
772
772
773
- During its initialization phase, ` usql` reads a standard [YAML
774
- configuration][yaml] file ` config.yaml` . On Windows this is ` %AppData%/usql` ,
775
- on macOS this is ` $HOME /Library/Application Support/usql` , on Linux and
776
- other Unix systems this is normally ` $HOME /.config/usql` .
773
+ During its initialization phase, ` usql` reads a standard [YAML configuration][yaml]
774
+ file ` config.yaml` . On Windows this is ` %AppData%/usql/config.yaml ` , on macOS
775
+ this is ` $HOME /Library/Application Support/usql/config.yaml ` , and on Linux and
776
+ other Unix systems this is normally ` $HOME /.config/usql/config.yaml ` .
777
777
778
- # #### Defining Connections
778
+ # #### `connections:`
779
779
780
- ` usql ` ' s `config.yaml` file can [contain predefined connection
781
- DSNs][connecting] defined as a string as a map:
780
+ [Named connection DSNs][connecting] can be defined under ` connections: ` as a string
781
+ or as a map:
782
782
783
783
` ` ` yaml
784
784
connections:
@@ -793,8 +793,8 @@ connections:
793
793
database: free
794
794
` ` `
795
795
796
- Named connections can be used on the command-line with with `\connect`, `\c `,
797
- `\copy`, and [other commands][commands]:
796
+ Defined ` connections: ` can be used on the command-line with with ` \c onnect` ,
797
+ ` \c ` , ` \ c opy` , and [other commands][commands]:
798
798
799
799
` ` ` sh
800
800
$ usql my_godror_conn
@@ -804,29 +804,28 @@ Type "help" for help.
804
804
gr:system@localhost/free=>
805
805
` ` `
806
806
807
- ##### Init Script
807
+ # #### `init:`
808
808
809
- An `init` script can be defined in `usql` ' s ` config.yaml ` :
809
+ An initialization script can be defined as ` init: ` :
810
810
811
811
` ` ` yaml
812
812
init: |
813
813
\e cho welcome to the jungle ` date`
814
814
\s et SYNTAX_HL_STYLE paraiso-dark
815
815
` ` `
816
816
817
- The script is read from the ` config.yaml` at startup in the same way as a file
818
- passed on the command-line with ` -f` / ` --file` , and will be executed prior to
819
- starting the interactive interpreter before any ` -c` / ` --command` / ` -f` /
820
- ` --file` flag.
817
+ The ` init:` string is read at startup and will executed prior to any ` -c` /
818
+ ` --command` / ` -f` / ` --file` flag and before starting the interactive
819
+ interpreter.
821
820
822
- The ` init ` script is commonly used to set startup environment variables and
823
- settings. The execution of the init script can be disabled on the command-line
824
- using the ` -X ` / ` --no-init ` flag.
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.
825
824
826
- # #### Other Options
825
+ # #### Other Config Options
827
826
828
- An up-to-date overview of other configuration options is available in
829
- [ ` contrib/config.yaml ` ](contrib/config.yaml) .
827
+ Please see [ ` contrib/config.yaml ` ](contrib/config.yaml) for examples of other
828
+ available configuration options .
830
829
831
830
# ### Variables
832
831
@@ -875,7 +874,7 @@ pg:booktest@localhost=> \set FOO bar
875
874
pg:booktest@localhost=> select * from :TBLNAME where :"COLNAME" = :' FOO'
876
875
```
877
876
878
- The query buffer and any interpolated values can be displayed with `\p` and
877
+ The query buffer and interpolated values can be displayed with `\p` and
879
878
`\print`, or the raw query buffer can be shown with `\raw`:
880
879
881
880
```sh
@@ -908,7 +907,7 @@ select ':FOO';
908
907
909
908
Connection variables work similarly to runtime variables, and are managed with
910
909
`\cset`. Connection variables can be used with the `\c`, `\connect`, `\copy`,
911
- or [any other command ][commands]:
910
+ or [other commands ][commands]:
912
911
913
912
```sh
914
913
(not connected)=> \cset my_conn postgres://user:pass@localhost
@@ -992,7 +991,7 @@ and writes to a destination database DSN:
992
991
` ` `
993
992
994
993
As demonstrated above, the ` \c opy` command does not require being connected to
995
- a database, and will not impact or alter any open database connection.
994
+ a database, and will not impact or alter the current open database connection.
996
995
997
996
Any valid URL or DSN name maybe used for the source and destination database:
998
997
0 commit comments