fish: default to yes in confirm function
This commit is contained in:
parent
30e0e631a6
commit
a148094bdd
@ -1,11 +1,11 @@
|
|||||||
function confirm --description "Ask for user confirmation" --argument-names prompt
|
function confirm --description "Ask for user confirmation" --argument-names prompt
|
||||||
while true
|
while true
|
||||||
read --local --prompt-str="$prompt [y/N] " confirmed
|
read --local --prompt-str="$prompt [Y/n] " confirmed
|
||||||
|
|
||||||
switch $confirmed
|
switch $confirmed
|
||||||
case Y y
|
case '' Y y
|
||||||
return 0
|
return 0
|
||||||
case '' N n
|
case N n
|
||||||
return 1
|
return 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user