MacPorts update to v21.0.3 causes "Syntaxfehler beim unerwarteten Wort `;'"
Created by: stefanscheidt
I'm using OS X 10.8.2 with MacPorts 2.1.2 and bash version 4.2.39(2)-release. In my .bashrc I do this:
if [ -f /opt/local/etc/profile.d/autojump.sh ]; then
. /opt/local/etc/profile.d/autojump.sh
fi
I just did a port update of autojump to version 21.0.3, and now opening a new terminal session causes
-bash: PROMPT_COMMAND: Zeile 0: Syntaxfehler beim unerwarteten Wort `;'
-bash: PROMPT_COMMAND: Zeile 0: `update_terminal_cwd; ; { [[ "$AUTOJUMP_HOME" == "$HOME" ]] && (autojump -a "$(pwd ${_PWD_ARGS})"&)>/dev/null 2>>"${AUTOJUMP_DATA_DIR}/.autojump_errors";} 2>/dev/null'
(Sorry for the german output ...) I have no idea what I'm doing, but changing line 62 in /opt/local/etc/profile.d/autojump.bash
from
case $PROMPT_COMMAND in
*autojump*) ;;
*) export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }$AUTOJUMP";;
esac
to
case $PROMPT_COMMAND in
*autojump*) ;;
*) export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND}$AUTOJUMP";;
esac
seem to fix the problem for me. So I suspect the issue is cause by this line
*) export PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND ; }$AUTOJUMP";;
in autojump.bash
.