summaryrefslogtreecommitdiffstats
path: root/src/options
diff options
context:
space:
mode:
authorDan Davison <dandavison7@gmail.com>2020-09-03 09:51:32 -0400
committerDan Davison <dandavison7@gmail.com>2020-09-03 09:51:32 -0400
commit8f88b5b1eb085cd87f27cc1679b8be17a6719912 (patch)
treec22813b8db24626494471fb81da83c0161bfb430 /src/options
parentba6535ea4169128f35c478bf30b409bd3f9d0673 (diff)
Hack: env var for boolean flag
The proper way would be using env = "DELTA_NAVIGATE", but see https://github.com/clap-rs/clap/issues/1476 https://github.com/TeXitoi/structopt/issues/372 Doing it as in this commit probably has drawbacks, e.g. related to whether the argument is recorded as having been supplied.
Diffstat (limited to 'src/options')
-rw-r--r--src/options/set.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/options/set.rs b/src/options/set.rs
index b8ea10a7..a6b4f151 100644
--- a/src/options/set.rs
+++ b/src/options/set.rs
@@ -74,6 +74,7 @@ pub fn set_options(
}
set_git_config_entries(opt, git_config);
}
+ opt.navigate = opt.navigate || env::get_boolean_env_var("DELTA_NAVIGATE");
let option_names = cli::Opt::get_option_names();