Skip to content

Commit c06bdb3

Browse files
authored
fix: clarify help text and docs for dbc add for multiple drivers (#349)
Updates the help text and the CLI reference to better indicate that you can pass multiple drivers to `dbc add`. This keeps the variable as `Driver` even though "Drivers" might make more sense so we follow the go-arg convention for repeatable args. Completions are also sync'd by this PR.
1 parent 860f77f commit c06bdb3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cmd/dbc/add.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"os"
2121
"path/filepath"
2222

23-
"github.com/Masterminds/semver/v3"
2423
tea "charm.land/bubbletea/v2"
2524
"charm.land/lipgloss/v2"
25+
"github.com/Masterminds/semver/v3"
2626
"github.com/columnar-tech/dbc/config"
2727
"github.com/pelletier/go-toml/v2"
2828
)
@@ -42,7 +42,7 @@ func driverListPath(path string) (string, error) {
4242
}
4343

4444
type AddCmd struct {
45-
Driver []string `arg:"positional,required" help:"Driver to add"`
45+
Driver []string `arg:"positional,required" help:"One or more drivers to add, optionally with a version constraint (for example: mysql, mysql=0.1.0, mysql>=1,<2)"`
4646
Path string `arg:"-p" placeholder:"FILE" default:"./dbc.toml" help:"Driver list to add to"`
4747
Pre bool `arg:"--pre" help:"Allow pre-release versions implicitly"`
4848
}

cmd/dbc/completions/dbc.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ complete -c dbc -n '__fish_dbc_needs_command' -l quiet -s q -d 'Suppress all out
3131
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'install' -d 'Install a driver'
3232
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'uninstall' -d 'Uninstall a driver'
3333
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'init' -d 'Create new driver list'
34-
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'add' -d 'Add a driver to the driver list'
34+
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'add' -d 'Add one or more drivers to the driver list'
3535
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'sync' -d 'Install all drivers in the driver list'
3636
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'search' -d 'Search for drivers'
3737
complete -f -c dbc -n '__fish_dbc_needs_command' -a 'remove' -d 'Remove a driver from the driver list'

cmd/dbc/completions/dbc.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function _dbc {
1616
'install[Install a driver]' \
1717
'uninstall[Uninstall a driver]' \
1818
'init[Create new driver list]' \
19-
'add[Add a driver to the driver list]' \
19+
'add[Add one or more drivers to the driver list]' \
2020
'sync[Install all drivers in the driver list]' \
2121
'search[Search for drivers]' \
2222
'info[Get detailed information about a specific driver]' \

docs/reference/cli.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ $ dbc init [PATH]
179179

180180
## add
181181

182-
Add a driver to a current [driver list](../concepts/driver_list.md).
182+
Add one or more drivers to the current [driver list](../concepts/driver_list.md).
183183

184184
<h3>Usage</h3>
185185

@@ -191,7 +191,7 @@ $ dbc add <DRIVER>
191191

192192
`DRIVER`
193193

194-
: Name of the driver to add. Can be a short driver name or a driver name with version requirement. Examples: `bigquery`, `bigquery=1.0.0`, `bigquery>1`.
194+
: Name of one or more drivers to add. Can be a short driver name or a driver name with version requirement. Examples: `bigquery`, `bigquery=1.0.0`, `bigquery>1`.
195195

196196
<h3>Options</h3>
197197

0 commit comments

Comments
 (0)