diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 23:00:06 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-07-20 23:00:06 +0200 |
| commit | 2f671f196e245ac1a791c001286e401a2fab9d3a (patch) | |
| tree | be90d8f16d5c8b65c6b77ebe1359d22e9738bbf6 /crates/client/src/atuin_client/mod.rs | |
| parent | chore: Commit (diff) | |
| download | atuin-2f671f196e245ac1a791c001286e401a2fab9d3a.zip | |
chore: Commit
Diffstat (limited to 'crates/client/src/atuin_client/mod.rs')
| -rw-r--r-- | crates/client/src/atuin_client/mod.rs | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/crates/client/src/atuin_client/mod.rs b/crates/client/src/atuin_client/mod.rs index fa40d8dd..3f36722f 100644 --- a/crates/client/src/atuin_client/mod.rs +++ b/crates/client/src/atuin_client/mod.rs @@ -1,2 +1,16 @@ pub(crate) mod settings; -// pub(crate) mod theme; + +pub async fn current_context(session: String) -> eyre::Result<Context> { + let hostname = get_host_user(); + let cwd = utils::get_current_dir(); + let host_id = Settings::host_id().await?; + let git_root = utils::in_git_repo(cwd.as_str()); + + Ok(Context { + session, + hostname, + cwd, + git_root, + host_id: host_id.0.as_simple().to_string(), + }) +} |
