Browse Source

shrc: fix showing last status in PS1

pull/1/head
10sr 11 years ago
parent
commit
4d46f6edda
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      shrc

+ 8
- 1
shrc View File

@@ -1194,5 +1194,12 @@ __my_set_title(){
}
PROMPT_COMMAND="__my_set_title \${USER}@\${HOSTNAME}\:\${PWD};
__my_set_screen_title \$(basename \"\$PWD\")/"
PROMPT_COMMAND="laststatus=\$?;$PROMPT_COMMAND"
if $inzsh
then
precmd(){
laststatus=$?
}
else
PROMPT_COMMAND="laststatus=\$?;$PROMPT_COMMAND"
fi
laststatus=0

Loading…
Cancel
Save