Skip to main content

generate_shell_hook

Function generate_shell_hook 

Source
pub fn generate_shell_hook(shell: &str) -> String
Expand description

Generates the shell hook script for the specified shell.

:param shell: Target shell name (“fish”, “bash”, “zsh”, etc.). :return: Wrapper script as a String.

§Example

use git_claw::workflow::shell::generate_shell_hook;

let script = generate_shell_hook("bash");
assert!(script.contains("claw()"));
assert!(script.contains("command git-claw"));

let fish_script = generate_shell_hook("fish");
assert!(fish_script.contains("function claw"));