1
0
Fork 0

added a small function to my shellrc

This commit is contained in:
Von Random 2015-03-11 18:00:03 +03:00
parent 56113e423d
commit 2010fd0576

14
shellrc
View file

@ -113,6 +113,20 @@ hide-info() {
unhide-info() { unhide-info() {
unset hide_info unset hide_info
} }
seconds-to-hr() {
local seconds d h m s
seconds=$1
if ((seconds)); then
((
d=seconds/86400,
h=seconds/3600%24,
m=seconds/60%60,
s=seconds%60
))
printf '%sd %sh %sm %ss\n' $d $h $m $s
fi
}
# }}} # }}}
if is_zsh; then if is_zsh; then
# zsh # zsh