aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-04-01 14:14:06 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-04-01 14:14:06 -0300
commitac71538396fed32de4ee8cc7e78b89a3fcdd83ce (patch)
tree4a6f95927da742e7e08bbd47b611806163fe1148
parentdf8673ba01dc4df5301593cf677d25886f608927 (diff)
downloadkvmx-ac71538396fed32de4ee8cc7e78b89a3fcdd83ce.tar.gz
kvmx-ac71538396fed32de4ee8cc7e78b89a3fcdd83ce.tar.bz2
List: format in columns
-rwxr-xr-xkvmx6
1 files changed, 3 insertions, 3 deletions
diff --git a/kvmx b/kvmx
index 0472bf1..56e4991 100755
--- 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
}