From 4cf480a1a5f08bde2f8a8d98941e6f45c0d70565 Mon Sep 17 00:00:00 2001 From: sentriz Date: Sat, 12 Aug 2017 00:09:13 +0100 Subject: [PATCH] Accept return as a valid answer to 'Edit the file again?' --- share/functions/funced.fish | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/share/functions/funced.fish b/share/functions/funced.fish index 687a6ffa1..a889a42c9 100644 --- a/share/functions/funced.fish +++ b/share/functions/funced.fish @@ -105,9 +105,7 @@ function funced --description 'Edit function definition' echo # add a line between the parse error and the prompt set -l repeat set -l prompt (_ 'Edit the file again\? [Y/n]') - while test -z "$repeat" - read -p "echo $prompt\ " repeat - end + read -p "echo $prompt\ " repeat if not contains $repeat n N no NO No nO continue end