fix: add bash cnf placeholder

This commit is contained in:
iff 2024-11-27 19:34:58 +01:00
parent 27d37220d2
commit b463071088

View file

@ -270,11 +270,23 @@ end
if cnf { if cnf {
match shell { match shell {
"bash" | "zsh" => { "bash" => {
init = format!( init = format!(
r#" r#"
command_not_found_handler() {{ command_not_found_handler() {{
eval $(_PR_LAST_COMMAND="$@" _PR_SHELL="{}" _PR_MODE=cnf "{}") eval $(_PR_LAST_COMMAND="_ $@" _PR_SHELL="{}" _PR_MODE="cnf" "{}")
}}
{}
"#,
shell, binary_path, init
);
}
"zsh" => {
init = format!(
r#"
command_not_found_handler() {{
eval $(_PR_LAST_COMMAND="$@" _PR_SHELL="{}" _PR_MODE="cnf" "{}")
}} }}
{} {}
@ -286,7 +298,7 @@ command_not_found_handler() {{
init = format!( init = format!(
r#" r#"
function fish_command_not_found --on-event fish_command_not_found function fish_command_not_found --on-event fish_command_not_found
eval $(_PR_LAST_COMMAND="$argv" _PR_SHELL="{}" _PR_MODE=cnf "{}") eval $(_PR_LAST_COMMAND="$argv" _PR_SHELL="{}" _PR_MODE="cnf" "{}")
end end
{} {}