From d79a5a315256193aef880b1f862aed677eb93c18 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 28 May 2016 12:34:04 +0200 Subject: [PATCH] Funced: Make removal safer, take two Now we try to remove the file and then the directory, without forcing anything, showing any (quite unexpected) error to the user, once. --- share/functions/funced.fish | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/share/functions/funced.fish b/share/functions/funced.fish index 14cb0d70a..fd3060a7e 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -124,8 +124,7 @@ function funced --description 'Edit function definition' break end set -l stat $status - # Only forcibly delete files to limit possible damage is tmpdir is set to something weird - rm -f $tmpname >/dev/null - rm -r $tmpdir >/dev/null + rm $tmpname >/dev/null + and rmdir $tmpdir >/dev/null return $stat end