From 71f8f302d6eaefe6c6e3f48942b6786e87a4d1bd Mon Sep 17 00:00:00 2001 From: Patrick Sunday <33767+cafedomingo@users.noreply.github.com> Date: Sat, 21 Mar 2026 18:29:48 -0700 Subject: [PATCH 1/2] add DietPi directories to PATH --- sh/env.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/sh/env.sh b/sh/env.sh index 38b5e12..8e0ffa7 100644 --- a/sh/env.sh +++ b/sh/env.sh @@ -44,6 +44,7 @@ paths=( "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin" # android cmdline-tools /opt/homebrew/opt/coreutils/libexec/gnubin # homebrew GNU utilities (arm64) /opt/homebrew/bin /opt/homebrew/sbin # homebrew (arm64) + /boot/dietpi /boot/dietpi/func /boot/dietpi/misc # DietPi "$HOME/.local/bin" # user-specific executable files "$HOME/.bin" "$HOME/bin" # personal executables ) From 75dcbe048e38059d963c1ec1301b0e5b2cc8ed06 Mon Sep 17 00:00:00 2001 From: Patrick Sunday <33767+cafedomingo@users.noreply.github.com> Date: Sat, 21 Mar 2026 18:34:47 -0700 Subject: [PATCH 2/2] add DietPi command aliases for zsh compatibility --- sh/aliases.sh | 11 +++++++++++ sh/env.sh | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sh/aliases.sh b/sh/aliases.sh index 610de8e..7a156fb 100644 --- a/sh/aliases.sh +++ b/sh/aliases.sh @@ -120,6 +120,17 @@ alias sudo='sudo ' # generate a random number alias rand='od -An -N2 -i /dev/urandom | xargs' +# DietPi +if [[ -d '/boot/dietpi' ]]; then + for cmd in /boot/dietpi/dietpi-*; do + alias "$(basename "$cmd")"="$cmd" + done + for cmd in /boot/dietpi/func/dietpi-* /boot/dietpi/misc/dietpi-*; do + [[ -x "$cmd" ]] && alias "$(basename "$cmd")"="$cmd" + done + alias cpu='/boot/dietpi/dietpi-cpuinfo' +fi + # macOS if [[ "$(uname -s)" == "Darwin" ]]; then # brew diff --git a/sh/env.sh b/sh/env.sh index 8e0ffa7..38b5e12 100644 --- a/sh/env.sh +++ b/sh/env.sh @@ -44,7 +44,6 @@ paths=( "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin" # android cmdline-tools /opt/homebrew/opt/coreutils/libexec/gnubin # homebrew GNU utilities (arm64) /opt/homebrew/bin /opt/homebrew/sbin # homebrew (arm64) - /boot/dietpi /boot/dietpi/func /boot/dietpi/misc # DietPi "$HOME/.local/bin" # user-specific executable files "$HOME/.bin" "$HOME/bin" # personal executables )