Skip to main content

suggest_command_in_dir

Function suggest_command_in_dir 

Source
pub fn suggest_command_in_dir(
    working_dir: &Path,
    subcommand: &str,
    args: &[&str],
    flags: &[&str],
) -> String
Expand description

Like suggest_command, but prepends -C <path> for commands targeting a specific worktree directory.

The path is formatted with tilde shortening when safe (no escaping needed) and falls back to a quoted absolute path otherwise.