Merge pull request #7 from jaesivsm/master

use ~ instead oh the home path
Get load with [pP]rocessor
This commit is contained in:
nojhan 2012-07-27 11:07:14 -07:00
commit 4df87ea6ac

View File

@ -141,7 +141,7 @@ fi
# get cpu number # get cpu number
__cpunum_Linux() __cpunum_Linux()
{ {
grep ^processor /proc/cpuinfo | wc -l grep ^[Pp]rocessor /proc/cpuinfo | wc -l
} }
__cpunum_FreeBSD() __cpunum_FreeBSD()
@ -385,7 +385,7 @@ __hg_branch_color()
# #
__shorten_path() __shorten_path()
{ {
local p="$1" local p=$(echo "$1" | sed -e "s|$HOME|~|")
local len="${#p}" local len="${#p}"
local len_percent=$2 local len_percent=$2
local max_len=$(($COLUMNS*$len_percent/100)) local max_len=$(($COLUMNS*$len_percent/100))