diff options
author | Dan Davison <dandavison7@gmail.com> | 2020-09-03 09:51:32 -0400 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2020-09-03 09:51:32 -0400 |
commit | 8f88b5b1eb085cd87f27cc1679b8be17a6719912 (patch) | |
tree | c22813b8db24626494471fb81da83c0161bfb430 /src/options | |
parent | ba6535ea4169128f35c478bf30b409bd3f9d0673 (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.rs | 1 |
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(); |