Skip to content

Commit

Permalink
fix: Update fish.rs for activation of mise (jdx#2542)
Browse files Browse the repository at this point in the history
* Update fish.rs for activation of mise

The if statement syntax is wrong due to which __mise_fish_command_not_found function not created

* update snapshots

---------

Co-authored-by: Jeff Dickey <216188+jdx@users.noreply.github.com>
  • Loading branch information
2 people authored and triarius committed Sep 18, 2024
1 parent a0482ba commit e8ebe9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/shell/fish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ impl Shell for Fish {
"#});
if Settings::get().not_found_auto_install {
out.push_str(&formatdoc! {r#"
if functions -q fish_command_not_found and not functions -q __mise_fish_command_not_found
if functions -q fish_command_not_found; and not functions -q __mise_fish_command_not_found
functions -e __mise_fish_command_not_found
functions -c fish_command_not_found __mise_fish_command_not_found
end
Expand Down
3 changes: 1 addition & 2 deletions src/shell/snapshots/mise__shell__fish__tests__activate.snap
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function __mise_env_eval_2 --on-event fish_preexec --description 'Update mise en

functions --erase __mise_cd_hook;
end;
if functions -q fish_command_not_found and not functions -q __mise_fish_command_not_found
if functions -q fish_command_not_found; and not functions -q __mise_fish_command_not_found
functions -e __mise_fish_command_not_found
functions -c fish_command_not_found __mise_fish_command_not_found
end
Expand All @@ -71,4 +71,3 @@ function fish_command_not_found
__fish_default_command_not_found_handler $argv
end
end

0 comments on commit e8ebe9b

Please sign in to comment.