aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-pty-proxy/src
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 00:54:30 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2026-06-11 00:54:30 +0200
commit5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8 (patch)
treec64baa8d5866c8e339eaf660dd3f94f30a3f7d8a /crates/atuin-pty-proxy/src
parentchore: Somewhat simplify sync code (diff)
downloadatuin-5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8.zip
chore: Move everything into one big crate
That helps remove duplicated code and rustc/cargo will now also show dead code correctly.
Diffstat (limited to '')
-rw-r--r--crates/atuin-pty-proxy/src/lib.rs48
-rw-r--r--crates/turtle/src/atuin_pty_proxy/capture.rs (renamed from crates/atuin-pty-proxy/src/capture.rs)2
-rw-r--r--crates/turtle/src/atuin_pty_proxy/debug.rs (renamed from crates/atuin-pty-proxy/src/debug.rs)2
-rw-r--r--crates/turtle/src/atuin_pty_proxy/osc133.rs (renamed from crates/atuin-pty-proxy/src/osc133.rs)0
-rw-r--r--crates/turtle/src/atuin_pty_proxy/pty_proxy.rs (renamed from crates/atuin-pty-proxy/src/pty_proxy.rs)2
-rw-r--r--crates/turtle/src/atuin_pty_proxy/runtime.rs (renamed from crates/atuin-pty-proxy/src/runtime.rs)8
-rw-r--r--crates/turtle/src/atuin_pty_proxy/screen.rs (renamed from crates/atuin-pty-proxy/src/screen.rs)0
7 files changed, 7 insertions, 55 deletions
diff --git a/crates/atuin-pty-proxy/src/lib.rs b/crates/atuin-pty-proxy/src/lib.rs
deleted file mode 100644
index d1571079..00000000
--- a/crates/atuin-pty-proxy/src/lib.rs
+++ /dev/null
@@ -1,48 +0,0 @@
-#[cfg(unix)]
-mod capture;
-#[cfg(unix)]
-mod debug;
-#[cfg(unix)]
-mod osc133;
-#[cfg(unix)]
-mod pty_proxy;
-#[cfg(unix)]
-mod runtime;
-#[cfg(unix)]
-mod screen;
-
-#[cfg(unix)]
-pub use capture::{CommandCapture, CommandCaptureSink};
-#[cfg(unix)]
-pub use pty_proxy::PtyProxy;
-
-#[cfg(not(unix))]
-#[expect(dead_code)]
-mod unsupported {
- use clap::{Args, Subcommand};
-
- #[derive(Args, Debug)]
- pub struct PtyProxy {
- /// Highlight OSC 133 prompt, input, output, and exit-code regions
- #[arg(long)]
- debug_osc133: bool,
-
- #[command(subcommand)]
- cmd: Option<Cmd>,
- }
-
- #[derive(Subcommand, Debug)]
- enum Cmd {
- /// Print shell code to initialize atuin pty-proxy on shell startup
- Init(Init),
- }
-
- #[derive(Args, Debug)]
- struct Init {
- /// Shell to generate init for. If omitted, attempt auto-detection
- shell: Option<String>,
- }
-}
-
-#[cfg(not(unix))]
-pub use unsupported::PtyProxy;
diff --git a/crates/atuin-pty-proxy/src/capture.rs b/crates/turtle/src/atuin_pty_proxy/capture.rs
index 6426035b..97ac9b8f 100644
--- a/crates/atuin-pty-proxy/src/capture.rs
+++ b/crates/turtle/src/atuin_pty_proxy/capture.rs
@@ -1,7 +1,7 @@
use std::sync::Arc;
use std::sync::atomic::{AtomicU16, Ordering};
-use crate::osc133::{Event, Params, Parser, Zone};
+use crate::atuin_pty_proxy::osc133::{Event, Params, Parser, Zone};
const HISTORY_ID_PARAM: &str = "history_id";
const SESSION_ID_PARAM: &str = "session_id";
diff --git a/crates/atuin-pty-proxy/src/debug.rs b/crates/turtle/src/atuin_pty_proxy/debug.rs
index 806bde90..bf311281 100644
--- a/crates/atuin-pty-proxy/src/debug.rs
+++ b/crates/turtle/src/atuin_pty_proxy/debug.rs
@@ -1,4 +1,4 @@
-use crate::osc133::{Event, Parser};
+use crate::atuin_pty_proxy::osc133::{Event, Parser};
pub(crate) const RESET: &[u8] = b"\x1b[0m";
diff --git a/crates/atuin-pty-proxy/src/osc133.rs b/crates/turtle/src/atuin_pty_proxy/osc133.rs
index 5b70f0aa..5b70f0aa 100644
--- a/crates/atuin-pty-proxy/src/osc133.rs
+++ b/crates/turtle/src/atuin_pty_proxy/osc133.rs
diff --git a/crates/atuin-pty-proxy/src/pty_proxy.rs b/crates/turtle/src/atuin_pty_proxy/pty_proxy.rs
index 19ccd274..8dde6f53 100644
--- a/crates/atuin-pty-proxy/src/pty_proxy.rs
+++ b/crates/turtle/src/atuin_pty_proxy/pty_proxy.rs
@@ -1,6 +1,6 @@
use clap::{Args, Subcommand, ValueEnum};
-use crate::{CommandCaptureSink, runtime};
+use crate::atuin_pty_proxy::{CommandCaptureSink, runtime};
#[derive(Args, Debug)]
pub struct PtyProxy {
diff --git a/crates/atuin-pty-proxy/src/runtime.rs b/crates/turtle/src/atuin_pty_proxy/runtime.rs
index 2b34fbb7..37c77eef 100644
--- a/crates/atuin-pty-proxy/src/runtime.rs
+++ b/crates/turtle/src/atuin_pty_proxy/runtime.rs
@@ -6,10 +6,10 @@ use std::sync::mpsc;
use crossterm::terminal;
use portable_pty::{CommandBuilder, PtySize, native_pty_system};
-use crate::capture::CommandCaptureTracker;
-use crate::debug::{Osc133DebugHighlighter, RESET};
-use crate::pty_proxy::RuntimeOptions;
-use crate::screen::{self, Msg};
+use crate::atuin_pty_proxy::capture::CommandCaptureTracker;
+use crate::atuin_pty_proxy::debug::{Osc133DebugHighlighter, RESET};
+use crate::atuin_pty_proxy::pty_proxy::RuntimeOptions;
+use crate::atuin_pty_proxy::screen::{self, Msg};
pub(crate) fn main(options: RuntimeOptions) {
if let Err(e) = run(options) {
diff --git a/crates/atuin-pty-proxy/src/screen.rs b/crates/turtle/src/atuin_pty_proxy/screen.rs
index 5b892e21..5b892e21 100644
--- a/crates/atuin-pty-proxy/src/screen.rs
+++ b/crates/turtle/src/atuin_pty_proxy/screen.rs