Browse Source

Experimental fix of PROMPT_COMMAND for OSX terminal app

pull/15/head
10sr 8 years ago
parent
commit
9c845689d1
1 changed files with 8 additions and 2 deletions
  1. +8
    -2
      shrc

+ 8
- 2
shrc View File

@@ -1309,11 +1309,17 @@ then
eval __my_set_title ${__terminal_title}
}
else
#echo "abc${PROMPT_COMMAND}def"
if ! expr "$PROMPT_COMMAND" : ".*;$" >/dev/null
then
$PROMPT_COMMAND="${PROMPT_COMMAND};"
fi

if test -n "$PROMPT_COMMAND"
then
PROMPT_COMMAND="laststatus=\$?;$PROMPT_COMMAND;__my_set_title \"${__terminal_title}\""
PROMPT_COMMAND="laststatus=\$?;${PROMPT_COMMAND}__my_set_title \"${__terminal_title}\";"
else
PROMPT_COMMAND="laststatus=\$?;__my_set_title \"${__terminal_title}\""
PROMPT_COMMAND="laststatus=\$?;__my_set_title \"${__terminal_title}\";"
fi
fi
laststatus=0

Loading…
Cancel
Save