From 58c465ef13aacd4c7a9494cf209af677021e703d Mon Sep 17 00:00:00 2001 From: Saugat Pachhai Date: Tue, 18 May 2021 17:47:18 +0545 Subject: [PATCH] ui: migrate completion to ui.write (#6029) --- dvc/command/completion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dvc/command/completion.py b/dvc/command/completion.py index c950d90ed..850bfb9d1 100644 --- a/dvc/command/completion.py +++ b/dvc/command/completion.py @@ -4,6 +4,7 @@ import logging import shtab from dvc.command.base import CmdBaseNoRepo, append_doc_link +from dvc.ui import ui logger = logging.getLogger(__name__) FILE = shtab.FILE @@ -95,7 +96,7 @@ class CmdCompletion(CmdBaseNoRepo): parser = get_main_parser() shell = self.args.shell script = shtab.complete(parser, shell=shell, preamble=PREAMBLE) - print(script) + ui.write(script, force=True) return 0