mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2026-02-02 15:45:11 +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 {
|
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
|
||||||
|
|
||||||
{}
|
{}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue