From 9dba2485d83b503e7197c6c290f1dc2eb31a6673 Mon Sep 17 00:00:00 2001 From: iff Date: Wed, 16 Apr 2025 01:01:08 +0200 Subject: [PATCH] chore: override cnf only in interactive for fish --- core/templates/init.fish | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 %}