diff --git a/install b/install
index f589076772e6a8921ffa4243d549ef4c96a4078c..e98f920a4dfb2e663f1611c0e372ce0cd734e043 100755
--- a/install
+++ b/install
@@ -185,7 +185,7 @@ for shell in bash zsh; do
   echo -n "Generate ~/.fzf.$shell ... "
   src=~/.fzf.${shell}
 
-  fzf_completion="[[ \$- =~ i ]] && source \"$fzf_base/shell/completion.${shell}\" 2> /dev/null"
+  fzf_completion="[[ \$- == *i* ]] && source \"$fzf_base/shell/completion.${shell}\" 2> /dev/null"
   if [ $auto_completion -ne 0 ]; then
     fzf_completion="# $fzf_completion"
   fi
@@ -198,13 +198,13 @@ for shell in bash zsh; do
   cat > $src << EOF
 # Setup fzf
 # ---------
-if [[ ! "\$PATH" =~ "$fzf_base/bin" ]]; then
+if [[ ! "\$PATH" == *$fzf_base/bin* ]]; then
   export PATH="\$PATH:$fzf_base/bin"
 fi
 
 # Man path
 # --------
-if [[ ! "\$MANPATH" =~ "$fzf_base/man" && -d "$fzf_base/man" ]]; then
+if [[ ! "\$MANPATH" == *$fzf_base/man* && -d "$fzf_base/man" ]]; then
   export MANPATH="\$MANPATH:$fzf_base/man"
 fi
 
diff --git a/shell/key-bindings.zsh b/shell/key-bindings.zsh
index 735aa501e8ecea762c3121f1de5579ea2ed8bf79..27810d328de4fbe996e216208d4c0e56890cf984 100644
--- a/shell/key-bindings.zsh
+++ b/shell/key-bindings.zsh
@@ -1,6 +1,6 @@
 # Key bindings
 # ------------
-if [[ $- =~ i ]]; then
+if [[ $- == *i* ]]; then
 
 # CTRL-T - Paste the selected file path(s) into the command line
 __fsel() {