mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-18 13:41:49 +03:00
Command help formatting (#383)
This commit is contained in:
parent
6dccb46a61
commit
3f85b236a3
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user