From 52eff27239b6acb87468e898fb22ca8bf11264ed Mon Sep 17 00:00:00 2001 From: David Adam Date: Sat, 10 Jul 2021 22:07:54 +0800 Subject: [PATCH] funced: don't source or save unmodified files If funced is just used to inspect a function, there's no need to write it to storage or to reload it. --- share/functions/funced.fish | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/functions/funced.fish b/share/functions/funced.fish index 455e035b6..b6c0d2623 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -104,6 +104,8 @@ function funced --description 'Edit function definition' set -l new_checksum (__funced_md5 "$tmpname") if test "$new_checksum" = "$checksum" echo (_ "Editor exited but the function was not modified") + # Don't source or save an unmodified file. + break end end