From 496ae010fccb564a35152b5eeafeb0cd3a500030 Mon Sep 17 00:00:00 2001 From: Vojtech Forejt Date: Wed, 19 Oct 2011 14:34:26 +0000 Subject: [PATCH] fixed a bug in bash completion (syntax error if last word contained a space) git-svn-id: https://www.prismmodelchecker.org/svn/prism/prism/trunk@4074 bbc10eb1-c90d-0410-af57-cb519fbb1720 --- prism/etc/scripts/bash_prism_completion.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/prism/etc/scripts/bash_prism_completion.sh b/prism/etc/scripts/bash_prism_completion.sh index 907e6d90..605ce739 100644 --- a/prism/etc/scripts/bash_prism_completion.sh +++ b/prism/etc/scripts/bash_prism_completion.sh @@ -13,7 +13,7 @@ _prismcomplete() { prev="${COMP_WORDS[COMP_CWORD-1]}" #TODO prev empty - if [ $prev = -const ]; then + if [ "$prev" = -const ]; then #get the name of the model MODELFILE=`echo $COMP_LINE | grep -E -o "[^ ]*[.]([psn]m|smg) " | sed "s/ ^//"` @@ -39,7 +39,7 @@ _prismcomplete() { return 0; fi; - #if [ $prev = -property ]; then + #if [ "$prev" = -property ]; then # # PROPFILE=`echo $COMP_LINE | grep -o "[^ ]*[.]pctl" | sed "s/ ^//"` # PROPFILE=`eval echo $PROPFILE` @@ -55,21 +55,21 @@ _prismcomplete() { # return 0; #fi; - if [ $prev = -simmethod ]; then + if [ "$prev" = -simmethod ]; then PARS="ci aci apmc sprt" COMPREPLY=( `compgen -W "$PARS" -- $cur` ) COMPREPLY=("${COMPREPLY[@]/%/ }") return 0; fi; - if [ $prev = -ptamethod ]; then + if [ "$prev" = -ptamethod ]; then PARS="games digital" COMPREPLY=( `compgen -W "$PARS" -- $cur` ) COMPREPLY=("${COMPREPLY[@]/%/ }") return 0; fi; - if [ $prev = -sccmethod ]; then + if [ "$prev" = -sccmethod ]; then PARS="xiebeerel lockstep sccfind" COMPREPLY=( `compgen -W "$PARS" -- $cur` ) COMPREPLY=("${COMPREPLY[@]/%/ }")