1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! Output and presentation layer for worktree commands.
//!
//! # Architecture
//!
//! For regular output, use `eprintln!`/`println!` directly (from `worktrunk::styling`
//! for color support). This module handles shell integration directives (cd, exec)
//! that need to be communicated to the parent shell.
//!
//! ## Usage
//!
//! ```rust,ignore
//! use worktrunk::styling::{success_message, error_message, hint_message, eprintln};
//!
//! eprintln!("{}", success_message("Operation complete"));
//! output::change_directory(&path);
//! output::execute("git pull");
//! ```
//!
//! ## Shell Integration
//!
//! Two split directive files, one for each trust level:
//! - `WORKTRUNK_DIRECTIVE_CD_FILE` — raw path; the wrapper `cd`s to it.
//! - `WORKTRUNK_DIRECTIVE_EXEC_FILE` — arbitrary shell; the wrapper sources it.
//!
//! The legacy single-file `WORKTRUNK_DIRECTIVE_FILE` env var is still honored
//! for one release to bridge users who upgraded `wt` without restarting
//! their shell. See `global` for the `DirectiveMode` selection logic.
//!
//! When no directive env vars are set (direct binary call):
//! - Commands execute directly.
//! - Shell hints are shown for missing integration.
//!
//! See [`shell_integration`] module for the complete spec of warning messages.
pub
pub
pub
pub
pub
// Re-export the public API
pub use ;
// Re-export output handlers
pub use ;
// Re-export shell integration functions
pub use ;
// Re-export commit generation functions
pub use prompt_commit_generation;