Command help formatting ()

This commit is contained in:
Neil O'Toole 2024-01-29 10:34:45 -07:00 committed by GitHub
parent 6dccb46a61
commit 3f85b236a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 26 deletions

View File

@ -129,7 +129,7 @@ More examples:
# Specify some params (note escaped chars)
$ sq add postgres://user:pass@localhost/sakila\?sslmode=disable\&application_name=sq
# Specify some params, but use quoted string (no shell completion)
# Specify some params, but use quoted string (no shell completion)
$ sq add 'postgres://user:pass@localhost/sakila?sslmode=disable&application_name=sq''
# Add a SQL Server source; will have generated handle @sakila

View File

@ -196,8 +196,8 @@ func newCacheEnableCmd() *cobra.Command { //nolint:dupl
Example: ` # Enable caching by default
$ sq cache enable
# Enable caching for a particular source
$ sq cache enable @sakila`,
# Enable caching for a particular source
$ sq cache enable @sakila`,
}
markCmdRequiresConfigLock(cmd)
@ -235,7 +235,7 @@ func newCacheDisableCmd() *cobra.Command { //nolint:dupl
$ sq cache disable
# Disable caching for a particular source
$ sq cache disable @sakila`,
$ sq cache disable @sakila`,
}
markCmdRequiresConfigLock(cmd)

View File

@ -232,7 +232,7 @@ only applies to SQL sources.`,
ValidArgsFunction: (&handleTableCompleter{
onlySQL: true,
}).complete,
Example: `# drop table "actor" in src @sakila_sl3
Example: ` # drop table "actor" in src @sakila_sl3
$ sq tbl drop @sakila_sl3.actor
# drop table "payment"" in the active src

View File

@ -38,30 +38,30 @@ Before upgrading, check the changelog: https://sq.io/changelog`,
# Verbose output
$ sq version -v
sq v0.38.0
Version: v0.38.0
Commit: #4e176716
Timestamp: 2023-06-21T11:39:39Z
Latest version: v0.39.0
Host: darwin arm64 | Darwin 22.5.0 | macOS 13.4
[...]
sq v0.38.0
Version: v0.38.0
Commit: #4e176716
Timestamp: 2023-06-21T11:39:39Z
Latest version: v0.39.0
Host: darwin arm64 | Darwin 22.5.0 | macOS 13.4
[...]
# JSON output
$ sq version -j
{
"version": "v0.38.0",
"commit": "4e176716",
"timestamp": "2023-06-19T22:08:54Z",
"latest_version": "v0.39.0",
"host": {
"platform": "darwin",
"arch": "arm64",
"kernel": "Darwin",
"kernel_version": "22.5.0",
"variant": "macOS",
"variant_version": "13.4"
}
}
{
"version": "v0.38.0",
"commit": "4e176716",
"timestamp": "2023-06-19T22:08:54Z",
"latest_version": "v0.39.0",
"host": {
"platform": "darwin",
"arch": "arm64",
"kernel": "Darwin",
"kernel_version": "22.5.0",
"variant": "macOS",
"variant_version": "13.4"
}
}
# Extract just the semver string
$ sq version -j | jq -r .version