mirror of
https://github.com/Steffo99/config-fish.git
synced 2024-12-22 23:04:22 +00:00
14 lines
No EOL
243 B
Fish
14 lines
No EOL
243 B
Fish
function confirm
|
|
log-t "Asking for a" "confirmation" "..."
|
|
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 |