mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
fix: add bash cnf placeholder
This commit is contained in:
parent
27d37220d2
commit
b463071088
1 changed files with 15 additions and 3 deletions
18
src/shell.rs
18
src/shell.rs
|
|
@ -270,11 +270,23 @@ end
|
|||
|
||||
if cnf {
|
||||
match shell {
|
||||
"bash" | "zsh" => {
|
||||
"bash" => {
|
||||
init = format!(
|
||||
r#"
|
||||
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!(
|
||||
r#"
|
||||
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
|
||||
|
||||
{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue