Add support for atuin integration, Homebrew on Linux and eza as ls replacement #17

Merged
pztrn merged 14 commits from hdkv/zsh-config:hdkv/ublue-hdkv into master 2026-11-08 23:30:56 +05:00
Showing only changes of commit d147770155 - Show all commits
-31
View File
@@ -1,31 +0,0 @@
function _docker_with_platform() {
local platform=$1
local extra_flags=$2
shift 2
local args=$@
local original="docker ${args}"
local cmd="${original}"
_substitutableCmds=(build pull run)
if [[ ${args} != *"--platform"* ]]; then
for command in ${_substitutableCmds[@]}; do
if [[ ${args} =~ (^|[[:space:]])${command}([[:space:]]|$) ]]; then
cmd=${cmd/${command}/${command} --platform=${platform}${extra_flags:+ ${extra_flags}}}
fi
done
fi
if [[ "${cmd}" != "${original}" ]]; then
echo -e "\e[34m-> ${cmd}\e[0m"
fi
eval "command ${cmd}"
}
function docker() {
_docker_with_platform "linux/arm64/v8" "" $@
}
function docker-amd64() {
_docker_with_platform "linux/amd64" "--device=lima-vm.io/rosetta=cached" $@
}