From 992dcd6113ade478791a023b909a739163192941 Mon Sep 17 00:00:00 2001 From: Austen Adler Date: Wed, 27 Jul 2016 01:02:38 -0400 Subject: [PATCH] Add -y option for youcompleteme.sh --- applications/youcompleteme.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/applications/youcompleteme.sh b/applications/youcompleteme.sh index 5ad3130..4efb148 100755 --- a/applications/youcompleteme.sh +++ b/applications/youcompleteme.sh @@ -1,8 +1,11 @@ #!/bin/zsh echo "Make sure this is in your .vimrc" echo "Plug 'https://github.com/Valloric/YouCompleteMe'" -echo -n "Press enter to continue..." -read a +if [ ! "$1" = "-y" ]; then + # They want to assume yes, require no user input + echo -n "Press enter to continue..." + read a +fi rm -rf ~/ycm_build mkdir ~/ycm_build cd ~/ycm_build @@ -15,6 +18,8 @@ cmake --build . --target ycm_core #npm install --production cd - echo "It should be done." -echo -n "Running vim to test for errors. Press enter to continue..." -read a -vim +q +if [ ! "$1" = "-y" ]; then + echo -n "Running vim to test for errors. Press enter to continue..." + read a + vim +q +fi