Allow confirm dialogue without default value

This commit is contained in:
Manuel Thalmann 2024-09-30 15:08:41 +02:00
parent 82eab22853
commit ecca742d1a

View file

@ -1,6 +1,6 @@
#!/bin/env fish
function confirm -a message default
set -l options (echo "[y/n]" | string replace $default (string upper $default))
set -l options (echo "[y/n]" | string replace "$default" (string upper "$default"))
while true
read -l value -P "$message $options "