Skip to content

Commit

Permalink
test for zsh and allow BASH_REMATCH if true
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Vanier committed Nov 23, 2015
1 parent f914b6e commit 6e56502
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions knife-block-prompt.sh
Expand Up @@ -26,6 +26,7 @@ _knife-block_ps1 () {
[ -z $knifesymlink ] && return $exit

#Extract current knife
[ -n "`$SHELL -c 'echo $ZSH_VERSION'`" ] && setopt KSH_ARRAYS BASH_REMATCH
[[ $knifesymlink =~ ${HOME}/\.chef/knife-(.*)\.rb ]]
currentknife=${BASH_REMATCH[1]}

Expand Down

0 comments on commit 6e56502

Please sign in to comment.