aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--home-manager/config/fish/config.fish6
1 files changed, 2 insertions, 4 deletions
diff --git a/home-manager/config/fish/config.fish b/home-manager/config/fish/config.fish
index 0d605ed..f881f4e 100644
--- a/home-manager/config/fish/config.fish
+++ b/home-manager/config/fish/config.fish
@@ -111,10 +111,8 @@ end
function terraform
set -l subcommand $argv[1]
if [ $subcommand = "apply" ]
- echo "Are you sure to apply?"
- echo -n "(y/n): "
- read answer
- if [ $answer = "y" ]
+ read --prompt-str "Are you sure to apply? (y/n): " answer
+ if [ $status -eq 0 -a "$answer" = "y" ]
command terraform $argv
else
echo "Cancelled."