Skip to content

Commit

Permalink
Set drivers completions when interactive only
Browse files Browse the repository at this point in the history
  • Loading branch information
remisalmon committed Sep 26, 2024
1 parent 1c33a7e commit c0940a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion handler/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,9 @@ func (h *Handler) Open(ctx context.Context, params ...string) error {
// force error/check connection
if err == nil {
if err = drivers.Ping(ctx, h.u, h.db); err == nil {
h.l.Completer(drivers.NewCompleter(ctx, h.u, h.db, readerOpts(), completer.WithConnStrings(h.connStrings())))
if h.l.Interactive() {
h.l.Completer(drivers.NewCompleter(ctx, h.u, h.db, readerOpts(), completer.WithConnStrings(h.connStrings())))
}
return h.Version(ctx)
}
}
Expand Down

0 comments on commit c0940a3

Please sign in to comment.