Skip to content

Commit

Permalink
Fix exitcode check in push
Browse files Browse the repository at this point in the history
  • Loading branch information
NyaMisty committed Aug 3, 2023
1 parent 8e84969 commit e1fe646
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zsh_conf/50-push.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@ prompt_preexec() {
}

prompt_precmd() {
exitcode=$?
if (( prompt_prexec_realtime )); then
local -rF elapsed_realtime=$(( EPOCHREALTIME - prompt_prexec_realtime ))
unset prompt_prexec_realtime

if [[ $? -eq 130 ]]; then
if [[ $exitcode -eq 130 ]]; then
return
fi
if (( elapsed_realtime < 40 )); then
return
fi
if [[ "$prompt_preexec_cmd" =~ ^(htop|top|btop|watch|vim).* ]]; then
if [[ "$prompt_preexec_cmd" =~ ^(htop|top|btop|watch|vim|tmux).* ]]; then
return
fi
local -rF s=$(( elapsed_realtime%60 ))
Expand Down

0 comments on commit e1fe646

Please sign in to comment.