Skip to content

Commit

Permalink
Disable globbing on replacing prompt symbols (fixes magicmonty#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmonty committed Nov 5, 2016
1 parent 9af8824 commit 6645a82
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gitprompt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,9 @@ function checkUpstream() {
}

function replaceSymbols() {
# Disable globbing, so a * could be used as symbol here
set -f

if [[ -z ${GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING} ]]; then
GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING=L
fi
Expand All @@ -435,6 +438,9 @@ function replaceSymbols() {
local VALUE2=${VALUE1//_NO_REMOTE_TRACKING_/${GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING}}

echo ${VALUE2//_PREHASH_/${GIT_PROMPT_SYMBOLS_PREHASH}}

# reenable globbing symbols
set +f
}

function createPrivateIndex {
Expand Down

0 comments on commit 6645a82

Please sign in to comment.