summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/functions.zsh2
-rw-r--r--lib/rvm.zsh4
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh
index d2dcadd0c..63ab755cf 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -1,5 +1,5 @@
function zsh_stats() {
- history | awk '{print $2}' | sort | uniq -c | sort -rn | head
+ history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
}
function uninstall_oh_my_zsh() {
diff --git a/lib/rvm.zsh b/lib/rvm.zsh
index 597be1b33..cb870a9bb 100644
--- a/lib/rvm.zsh
+++ b/lib/rvm.zsh
@@ -1,7 +1,5 @@
# get the name of the branch we are on
function rvm_prompt_info() {
ruby_version=$(~/.rvm/bin/rvm-prompt 2> /dev/null) || return
- echo "($ruby_version)"
+ [[ ! -z $ruby_version ]] && echo "($ruby_version)"
}
-
-