Allow confirm
dialogue without default value
This commit is contained in:
parent
82eab22853
commit
ecca742d1a
1 changed files with 1 additions and 1 deletions
|
@ -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 "
|
||||
|
|
Loading…
Reference in a new issue