kabu 0.7.1

CLI tool to enhance git worktree and jj workspace with automated setup
//! Change directory command implementation.
//!
//! This command requires shell integration (`kabu init`). Without shell integration,
//! it returns an error with instructions. The actual directory change is handled
//! by the shell wrapper function that calls `kabu path` and `cd`.

use crate::error::{Error, Result};

pub(crate) fn run() -> Result<()> {
    Err(Error::CdRequiresShellIntegration)
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn test_run_returns_shell_integration_required() {
        let result = run();
        assert!(matches!(
            result.unwrap_err(),
            Error::CdRequiresShellIntegration
        ));
    }
}