From ca946860ce6ce5d4800b0d93d3f83c30d3c953c0 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 29 Jun 2020 14:37:22 +0200 Subject: [PATCH] Fix bash completion --- src/libmain/loggers.cc | 3 ++- src/nix/main.cc | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libmain/loggers.cc b/src/libmain/loggers.cc index c44bb6408..f62e9372c 100644 --- a/src/libmain/loggers.cc +++ b/src/libmain/loggers.cc @@ -1,12 +1,13 @@ #include "loggers.hh" #include "progress-bar.hh" +#include "util.hh" namespace nix { LogFormat defaultLogFormat = LogFormat::raw; LogFormat parseLogFormat(const std::string & logFormatStr) { - if (logFormatStr == "raw") + if (logFormatStr == "raw" || getEnv("NIX_GET_COMPLETIONS")) return LogFormat::raw; else if (logFormatStr == "raw-with-logs") return LogFormat::rawWithLogs; diff --git a/src/nix/main.cc b/src/nix/main.cc index 2ad748289..e62657e95 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -7,7 +7,6 @@ #include "legacy.hh" #include "shared.hh" #include "store-api.hh" -#include "progress-bar.hh" #include "filetransfer.hh" #include "finally.hh" #include "loggers.hh"