Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Import with arbitrary user/host #988

Closed
dotsam opened this issue May 19, 2023 · 2 comments
Closed

[Enhancement] Import with arbitrary user/host #988

dotsam opened this issue May 19, 2023 · 2 comments

Comments

@dotsam
Copy link
Contributor

dotsam commented May 19, 2023

I've found some old shell history files, and although I could import them by setting HISTFILE, they would be imported with the current host/user where I run the import, and that's not where these files originate from.

I would like to see support for optionally specifying a file, hostname, and username with the import command

@benjaminwood
Copy link

@dotsam I had this same challenge.

Turns out you can simply specify ATUIN_HOST_NAME & ATUIN_HOST_USER as env-vars before import:

let host = host.unwrap_or_else(|| {
hash_str(&format!(
"{}:{}",
env::var("ATUIN_HOST_NAME").unwrap_or_else(|_| whoami::hostname()),
env::var("ATUIN_HOST_USER").unwrap_or_else(|_| whoami::username())
))
});

@dotsam
Copy link
Contributor Author

dotsam commented Aug 8, 2023

Ah, looks like that's new since I opened the issue. Closing this as fixed by #1041 and released in v16

@dotsam dotsam closed this as completed Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants