]> gitweb.fluxo.info Git - kvmx.git/commitdiff
List: format in columns
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 1 Apr 2017 17:14:06 +0000 (14:14 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 1 Apr 2017 17:14:06 +0000 (14:14 -0300)
kvmx

diff --git a/kvmx b/kvmx
index 0472bf17e188b28eb9b164540a54b7a46cbb4e8c..56e4991bc16f9048289911b5c5dc6c31cc1d1bed 100755 (executable)
--- a/kvmx
+++ b/kvmx
@@ -370,12 +370,12 @@ function kvmx_usage {
   echo -e "\t$BASENAME clone <orig-guest> <dest-folder>"
   echo ""
 
-  local list="`kvmx_list | xargs`"
+  local list="`kvmx_list`"
 
   if [ ! -z "$list" ]; then
     echo "available virtual machines:"
     echo ""
-    echo -e "\t$list"
+    echo "$list" | sed -e 's/^/\t/'
     echo ""
   fi
 
@@ -525,7 +525,7 @@ function kvmx_rsync {
 # List guests
 function kvmx_list {
   if [ -e "$GLOBAL_USER_CONFIG_FOLDER" ]; then
-    ls $GLOBAL_USER_CONFIG_FOLDER
+    ls -1 $GLOBAL_USER_CONFIG_FOLDER | xargs -L 6 | column -t -c 6
   fi
 }