Skip to content

Commit 6c722fe

Browse files
committed
Some fixes
1 parent b30eaf4 commit 6c722fe

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

helper.zsh

+5-4
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,20 @@ function autoloadable {
3434
}
3535

3636
function format-elapsed {
37+
hours=$(($1 / 10000000000000 % 24))
3738
mins=$(($1 / 100000000000 % 60))
3839
secs=$(($1 / 1000000000 % 60))
3940
hsecs=$(($1 / 10000000 % 100))
4041
msecs=$(($1 / 1000000 % 1000))
4142
local elapsed
42-
if [[ $mins > 0 ]]; then
43-
elapsed+="$mins mins $secs secs"
43+
if [[ $hours > 0 ]]; then
44+
elapsed+="$hours hours, $mins mins and $secs secs"
45+
elif [[ $mins > 0 ]]; then
46+
elapsed+="$mins mins and $secs secs"
4447
elif [[ $secs > 0 ]]; then
4548
elapsed+="$secs.$hsecs secs"
4649
elif [[ $msecs > 0 ]]; then
4750
elapsed+="$msecs ms"
48-
elif [[ $nsecs >0 ]]; then
49-
elapsed+="$1 ns"
5051
else
5152
elapsed+="0"
5253
fi

modules/notify/init.zsh

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ notify_precmd() {
4747
if [[ "$alias_notify_cmd" == "" ]]; then
4848
alias_notify_cmd=`echo $notify_cmd | awk '{print $1}'`
4949
fi
50-
if [[ ! "$alias_notify_cmd" == (vi|vim|top|ssh|cmatrix|telnet|tmux|mux|) ]]; then
50+
if [[ ! "$alias_notify_cmd" == (vi|vim|top|ssh|cmatrix|telnet|tmux|mux|workon|) ]]; then
5151
if [[ $elapsedsecs -gt $max ]]; then
5252
if [[ $exitstatus == 0 ]]; then
5353
message="Completed after $(format-elapsed $elapsed)"

0 commit comments

Comments
 (0)