|
|
@ -3058,7 +3058,7 @@ export -f get_volumes_for_container |
|
|
|
is_volume_used() { |
|
|
|
local volume="$1" container_id src dst |
|
|
|
|
|
|
|
while read container_id; do |
|
|
|
while read -r container_id; do |
|
|
|
while read-0 src dst; do |
|
|
|
[[ "$src" == "$volume"/* ]] && return 0 |
|
|
|
done < <(get_volumes_for_container "$container_id") |
|
|
@ -3315,7 +3315,7 @@ get_master_services() { |
|
|
|
fi |
|
|
|
echo "$master_service" |
|
|
|
loaded["$master_service"]=1 |
|
|
|
done | xargs printf "%s " |
|
|
|
done | nspc |
|
|
|
return "${PIPESTATUS[0]}" |
|
|
|
} |
|
|
|
export -f get_master_services |
|
|
@ -3392,7 +3392,7 @@ get_docker_compose_usage() { |
|
|
|
echo "$docker_compose_help_msg" | |
|
|
|
grep -m 1 "^Usage:" -A 10000 | |
|
|
|
egrep -m 1 "^\$" -B 10000 | |
|
|
|
xargs printf "%s " | |
|
|
|
nspc | |
|
|
|
sed -r 's/^Usage: //g' | |
|
|
|
tee "$cache_file" || return 1 |
|
|
|
} |
|
|
@ -3486,13 +3486,13 @@ _MULTIOPTION_REGEX_LINE_FILTER=$_MULTIOPTION_REGEX'(\s|=)' |
|
|
|
multi_opts_filter() { |
|
|
|
egrep "$_MULTIOPTION_REGEX_LINE_FILTER" | |
|
|
|
sed -r "s/^($_MULTIOPTION_REGEX)(\s|=).*$/\1/g" | |
|
|
|
tr ',' "\n" | xargs printf "%s " |
|
|
|
tr ',' "\n" | nspc |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
single_opts_filter() { |
|
|
|
egrep -v "$_MULTIOPTION_REGEX_LINE_FILTER" | |
|
|
|
tr ',' "\n" | xargs printf "%s " |
|
|
|
tr ',' "\n" | nspc |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|