Add support for passing arguments to tmux (fix #236) (#250)

This commit is contained in:
Roey Darwish Dror
2019-11-06 07:27:01 +02:00
committed by GitHub
parent 6021a551ac
commit 8ce55f4c31
5 changed files with 75 additions and 39 deletions

View File

@@ -57,6 +57,7 @@ pub struct ConfigFile {
remote_topgrades: Option<Vec<String>>,
ssh_arguments: Option<String>,
git_arguments: Option<String>,
tmux_arguments: Option<String>,
set_title: Option<bool>,
assume_yes: Option<bool>,
yay_arguments: Option<String>,
@@ -289,6 +290,11 @@ impl Config {
&self.config_file.git_arguments
}
/// Extra Tmux arguments
pub fn tmux_arguments(&self) -> &Option<String> {
&self.config_file.tmux_arguments
}
/// Prompt for a key before exiting
pub fn keep_at_end(&self) -> bool {
self.opt.keep_at_end || env::var("TOPGRADE_KEEP_END").is_ok()