workmux 0.1.181

An opinionated workflow tool that orchestrates git worktrees and tmux
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::git;
use anyhow::{Result, anyhow};

pub fn run(name: &str) -> Result<()> {
    // Smart resolution: try handle first, then branch name
    let (path, _branch) = git::find_worktree(name).map_err(|_| {
        anyhow!(
            "Worktree '{}' not found. Use 'workmux list' to see available worktrees.",
            name
        )
    })?;
    println!("{}", path.display());
    Ok(())
}