From 2339a67c01abbd70b55faf72c80617c957b45b0f Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Wed, 3 Dec 2008 21:40:33 +0000 Subject: [PATCH] adding username handling --- inxi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inxi b/inxi index 541f50e..bee7eb5 100755 --- a/inxi +++ b/inxi @@ -1933,7 +1933,9 @@ get_partition_data() print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main" } ! /\/$|\/boot$|\/var$|\/home$|\/tmp$|\/usr$|tmpfs|udev|^filesystem/ && ! /aufs/ { - print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary" + # cleaning up user name here to avoid showing too much info on irc + partitionName=gensub( /^\/home\/(.*)\/(.*)/, "/home//\\2", 1, $NF ) + print partitionName "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",secondary" } ' ) # now add the swap partition data, doesn't show percent used, someone can figure that in the future