diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2024-07-25 23:31:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-25 23:31:38 +0100 |
| commit | c32bbcc7edc2cf99da52b1407c90238bc781a804 (patch) | |
| tree | 4a8b307f69fb444f5c8c15a65e6f89170d9d4bbf /ui/backend/src/run | |
| parent | feat(gui): allow interacting with the embedded terminal (#2312) (diff) | |
| download | atuin-c32bbcc7edc2cf99da52b1407c90238bc781a804.zip | |
feat(gui): directory block, re-org of some code (#2314)
Diffstat (limited to 'ui/backend/src/run')
| -rw-r--r-- | ui/backend/src/run/pty.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ui/backend/src/run/pty.rs b/ui/backend/src/run/pty.rs index 58bfccb7..0ca5ece0 100644 --- a/ui/backend/src/run/pty.rs +++ b/ui/backend/src/run/pty.rs @@ -11,9 +11,12 @@ use atuin_client::{database::Sqlite, record::sqlite_store::SqliteStore, settings pub async fn pty_open<'a>( app: tauri::AppHandle, state: State<'a, AtuinState>, + cwd: Option<String>, ) -> Result<uuid::Uuid, String> { let id = uuid::Uuid::new_v4(); - let pty = crate::pty::Pty::open(24, 80).await.unwrap(); + + let cwd = cwd.map(|c|shellexpand::tilde(c.as_str()).to_string()); + let pty = crate::pty::Pty::open(24, 80, cwd).await.unwrap(); let reader = pty.reader.clone(); |
