diff options
Diffstat (limited to 'atuin-client/src/database.rs')
| -rw-r--r-- | atuin-client/src/database.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs index c4a9ddc3..f7c063ce 100644 --- a/atuin-client/src/database.rs +++ b/atuin-client/src/database.rs @@ -43,7 +43,11 @@ pub fn current_context() -> Context { eprintln!("ERROR: Failed to find $ATUIN_SESSION in the environment. Check that you have correctly set up your shell."); std::process::exit(1); }; - let hostname = format!("{}:{}", whoami::hostname(), whoami::username()); + let hostname = format!( + "{}:{}", + env::var("ATUIN_HOST_NAME").unwrap_or_else(|_| whoami::hostname()), + env::var("ATUIN_HOST_USER").unwrap_or_else(|_| whoami::username()) + ); let cwd = utils::get_current_dir(); Context { |
