mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 23:04:22 +00:00
13 lines
No EOL
242 B
Fish
13 lines
No EOL
242 B
Fish
function confirm
|
|
set -g ANSWER (read -n 1 -P "Confirm? (y/N) ")
|
|
|
|
if test -z $ANSWER
|
|
return 1
|
|
else if test $ANSWER = "y"
|
|
return 0
|
|
else if test $ANSWER = "Y"
|
|
return 0
|
|
else
|
|
return 1
|
|
end
|
|
end |