From dec5f076be1730dfff051ee17e3955eb664c3763 Mon Sep 17 00:00:00 2001 From: Tri Vo Khac Date: Sat, 19 Apr 2025 04:12:57 +0000 Subject: [PATCH] feat: enhance Docker alias to support podman fallback - Replaced the Docker alias with a function that checks for podman availability. - If podman is installed, it uses podman; otherwise, it defaults to the Docker command. --- zsh/.config/zsh/config/alias.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/zsh/.config/zsh/config/alias.zsh b/zsh/.config/zsh/config/alias.zsh index 76d3a99..825427b 100644 --- a/zsh/.config/zsh/config/alias.zsh +++ b/zsh/.config/zsh/config/alias.zsh @@ -16,5 +16,10 @@ alias gc='git commit' alias gp='git push' alias gl='git pull' -# Docker shortcuts -alias docker='podman' +docker() { + if command -v podman >/dev/null 2>&1; then + podman "$@" + else + command docker "$@" + fi +}