Commit 04a24815 authored by Vitaly Lipatov's avatar Vitaly Lipatov

allow containers' names in list

parent a03c8a09
...@@ -41,6 +41,11 @@ list_ALL() ...@@ -41,6 +41,11 @@ list_ALL()
a= docker ps -a -q | line_filter a= docker ps -a -q | line_filter
} }
list_ALL_names()
{
a= docker ps --all -q --format "{{.Names}}" | line_filter
}
todo() todo()
{ {
warning "$@" warning "$@"
......
...@@ -43,7 +43,10 @@ get_list() ...@@ -43,7 +43,10 @@ get_list()
arg_is_id() arg_is_id()
{ {
echo " $(list_ALL) " | grep -q " $1 " [ -n "$1" ] || return 1
echo " $(list_ALL) " | grep -q " $1 " && return 0
echo " $(list_ALL_names) " | grep -q " $1 " && return 0
return 1
} }
arg_is_all() arg_is_all()
......
...@@ -25,6 +25,7 @@ list_all() ...@@ -25,6 +25,7 @@ list_all()
return return
fi fi
# TODO
#a= pct list | grep "[0-9]\+" | sed -e "s| *\([0-9]\+\) .*|\1|" | line_filter #a= pct list | grep "[0-9]\+" | sed -e "s| *\([0-9]\+\) .*|\1|" | line_filter
} }
...@@ -36,9 +37,16 @@ list_ALL() ...@@ -36,9 +37,16 @@ list_ALL()
return return
fi fi
# TODO
#a= pct list | grep "[0-9]\+" | sed -e "s| *\([0-9]\+\) .*|\1|" | line_filter #a= pct list | grep "[0-9]\+" | sed -e "s| *\([0-9]\+\) .*|\1|" | line_filter
} }
list_ALL_names()
{
# TODO
return
}
todo() todo()
{ {
warning "FIXME: $@" warning "FIXME: $@"
......
...@@ -39,6 +39,11 @@ list_ALL() ...@@ -39,6 +39,11 @@ list_ALL()
a= qm list | grep "[0-9]\+" | sed -e "s| *\([0-9]\+\) .*|\1|" | line_filter a= qm list | grep "[0-9]\+" | sed -e "s| *\([0-9]\+\) .*|\1|" | line_filter
} }
list_ALL_names()
{
a= qm list | grep "[0-9]\+" | sed -e "s| *\([0-9]\+\) .*|\1|" | line_filter
}
todo() todo()
{ {
warning "FIXME: $@" warning "FIXME: $@"
......
...@@ -41,6 +41,12 @@ list_ALL() ...@@ -41,6 +41,12 @@ list_ALL()
# | line_filter # | line_filter
} }
list_ALL_names()
{
#a= vboxmanage list vms | sed -e "s| {.*||"
return
}
todo() todo()
{ {
warning "$@" warning "$@"
......
...@@ -32,6 +32,11 @@ list_ALL() ...@@ -32,6 +32,11 @@ list_ALL()
a= vzlist -1 -a "$@" | line_filter a= vzlist -1 -a "$@" | line_filter
} }
list_ALL_names()
{
a= vzlist -H -a -o name | grep -v "^-$"
}
evz_vzctl() evz_vzctl()
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment