Fix the warnings to output for the between passwords and write some tests for it, also write tests for some environment variables.

This commit is contained in:
Kiyomichi Kosaka
2022-12-21 12:59:57 +00:00
parent f67b64080c
commit c03d6ab560
7 changed files with 200 additions and 90 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ pub fn get_cmd_args_from_command(command: &str) -> io::Result<(String, Vec<Strin
}
pub fn get_copy_command_from_env() -> (String, Vec<String>) {
let cmd_os_str = env::var_os("LESSKEY_PB").unwrap_or_else(|| match env::consts::OS {
let cmd_os_str = env::var_os("HEL_PB").unwrap_or_else(|| match env::consts::OS {
_ if env::var("TMUX").is_ok() => OsString::from("tmux load-buffer -"),
"macos" => OsString::from("pbcopy"),
"linux" => OsString::from("xclip"),