From 9b3ac2558bdff173c6dec41e571412011a60ec10 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Tue, 3 Nov 2020 10:06:52 -0800 Subject: [PATCH] Simplify install --- conf.d/_tide_init.fish | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/conf.d/_tide_init.fish b/conf.d/_tide_init.fish index 9213883..3acb3a7 100644 --- a/conf.d/_tide_init.fish +++ b/conf.d/_tide_init.fish @@ -33,16 +33,12 @@ function _tide_init_install --on-event _tide_init_install source "$__fish_config_dir/functions/fish_prompt.fish" if status is-interactive - while true - switch (read --prompt-str="Configure tide prompt? [Y/n] ") - case y Y yes Yes '' - tide configure - case n N no No - printf '%s' \ - \n 'Run ' (set_color $fish_color_command) 'tide ' \ - (set_color $fish_color_param) 'configure ' (set_color normal) 'to customize your prompt.' \n - end - break + switch (read --prompt-str="Configure tide prompt? [Y/n] " | string lower) + case y ye yes '' + tide configure + case n no '*' + printf '%s' \n 'Run ' (set_color $fish_color_command) 'tide ' \ + (set_color $fish_color_param) 'configure ' (set_color normal) 'to customize your prompt.' \n end end end