From 911269c4a9d634970529ec9115cfb222a6835417 Mon Sep 17 00:00:00 2001 From: David Adam Date: Sat, 10 Jul 2021 21:30:31 +0800 Subject: [PATCH] funcsave: avoid the edited function's path being a temporary file As functions know where they are loaded from now, there is no point in them being marked as loaded from a temporary file that has been removed. Source the function via a redirect instead. --- share/functions/funced.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/funced.fish b/share/functions/funced.fish index 583755ce3..455e035b6 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -107,7 +107,7 @@ function funced --description 'Edit function definition' end end - if not source $tmpname + if not source <$tmpname # Failed to source the function file. Prompt to try again. echo # add a line between the parse error and the prompt set -l repeat