Allow confirm
dialogue without default value
This commit is contained in:
parent
82eab22853
commit
ecca742d1a
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/env fish
|
#!/bin/env fish
|
||||||
function confirm -a message default
|
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
|
while true
|
||||||
read -l value -P "$message $options "
|
read -l value -P "$message $options "
|
||||||
|
|
Loading…
Reference in a new issue