Merge pull request #1222 from ezchi/develop

Avoid double semicolon in the PROMPT_COMMAND
pull/1223/head
Nils Winkler 2018-08-03 08:39:54 +02:00 committed by GitHub
commit 90c2c53bfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ about-plugin 'osx-specific functions'
if [ $(uname) = "Darwin" ]; then if [ $(uname) = "Darwin" ]; then
if type update_terminal_cwd > /dev/null 2>&1 ; then if type update_terminal_cwd > /dev/null 2>&1 ; then
if ! [[ $PROMPT_COMMAND =~ (^|;)update_terminal_cwd($|;) ]] ; then if ! [[ $PROMPT_COMMAND =~ (^|;)update_terminal_cwd($|;) ]] ; then
PROMPT_COMMAND="$PROMPT_COMMAND;update_terminal_cwd" PROMPT_COMMAND="${PROMPT_COMMAND%;};update_terminal_cwd"
declared="$(declare -p PROMPT_COMMAND)" declared="$(declare -p PROMPT_COMMAND)"
[[ "$declared" =~ \ -[aAilrtu]*x[aAilrtu]*\ ]] 2>/dev/null [[ "$declared" =~ \ -[aAilrtu]*x[aAilrtu]*\ ]] 2>/dev/null
[[ $? -eq 0 ]] && export PROMPT_COMMAND [[ $? -eq 0 ]] && export PROMPT_COMMAND