fix: motd: fix inconsistent delimiter in container names display

The paste -sd', ' - command treats each character as a separate
delimiter to alternate between, resulting in inconsistent spacing.
Fix by using single comma delimiter then adding spaces with sed.
This commit is contained in:
Igor Pecovnik 2026-01-26 19:51:36 +01:00 committed by Igor
parent e2653ecb39
commit ad45d09ca4

View File

@ -36,7 +36,7 @@ _motd_mark_after_header() {
list_docker_names() {
# Only show names if Docker is active and CLI is present
if systemctl is-active --quiet docker && command -v docker >/dev/null 2>&1; then
docker ps --format '{{.Names}}' 2>/dev/null | paste -sd', ' -
docker ps --format '{{.Names}}' 2>/dev/null | paste -sd, - | sed 's/,/, /g'
fi
}