diff --git a/core/templates/init.fish b/core/templates/init.fish index dc482da..7f6ab02 100644 --- a/core/templates/init.fish +++ b/core/templates/init.fish @@ -3,7 +3,9 @@ function {{ alias }} -d "Suggest fixes to the previous command" end {%if cnf %} -function fish_command_not_found --on-event fish_command_not_found - eval $(_PR_LAST_COMMAND="$argv" _PR_ALIAS="$(alias)" _PR_SHELL="fish" _PR_MODE="cnf" "{{ binary_path }}") +if status is-interactive + function fish_command_not_found --on-event fish_command_not_found + eval $(_PR_LAST_COMMAND="$argv" _PR_ALIAS="$(alias)" _PR_SHELL="fish" _PR_MODE="cnf" "{{ binary_path }}") + end end {% endif %}