From a148094bddbc424546daea5c8c00cf646f0142f1 Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Tue, 20 Dec 2022 13:37:47 -0500 Subject: [PATCH] fish: default to yes in confirm function --- fish/functions/confirm.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fish/functions/confirm.fish b/fish/functions/confirm.fish index 4e8945e..fd48310 100644 --- a/fish/functions/confirm.fish +++ b/fish/functions/confirm.fish @@ -1,11 +1,11 @@ function confirm --description "Ask for user confirmation" --argument-names prompt while true - read --local --prompt-str="$prompt [y/N] " confirmed + read --local --prompt-str="$prompt [Y/n] " confirmed switch $confirmed - case Y y + case '' Y y return 0 - case '' N n + case N n return 1 end end