From 802ce0400f4926a60132a50a525af2efb5cc510e Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Fri, 2 Jan 2015 18:24:32 -0500 Subject: [PATCH] Added -y option for install script --- install | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/install b/install index 3176b27..d0a016d 100755 --- a/install +++ b/install @@ -59,17 +59,23 @@ else fzf_cmd="$ruby $fzf_base/fzf" fi -# Auto-completion -read -p "Do you want to add auto-completion support? ([y]/n) " -n 1 -r -echo -[[ ! $REPLY =~ ^[Nn]$ ]] -auto_completion=$? +if [[ $1 == "-y" ]] ; then + # If install -y is called, force auto completion and key_bindings to be enabled + auto_completion=0 + key_bindings=0 +else + # Auto-completion + read -p "Do you want to add auto-completion support? ([y]/n) " -n 1 -r + echo + [[ ! $REPLY =~ ^[Nn]$ ]] + auto_completion=$? -# Key-bindings -read -p "Do you want to add key bindings? ([y]/n) " -n 1 -r -echo -[[ ! $REPLY =~ ^[Nn]$ ]] -key_bindings=$? + # Key-bindings + read -p "Do you want to add key bindings? ([y]/n) " -n 1 -r + echo + [[ ! $REPLY =~ ^[Nn]$ ]] + key_bindings=$? +fi echo for shell in bash zsh; do