From df49c8b68d5423f1bd889f4857365809b72a6657 Mon Sep 17 00:00:00 2001 From: aloslider <53711835+aloslider@users.noreply.github.com> Date: Tue, 20 Oct 2026 07:37:41 +0300 Subject: [PATCH] [zsh] Add chezetc fix for root shell --- dot_config/zsh/dot_zshrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/dot_config/zsh/dot_zshrc b/dot_config/zsh/dot_zshrc index 6f2a969..5139cbf 100644 --- a/dot_config/zsh/dot_zshrc +++ b/dot_config/zsh/dot_zshrc @@ -30,6 +30,21 @@ alias dl-yt="bash $HOME/.local/scripts/yt-dlp/download.sh" alias compress-video="bash $HOME/.local/scripts/ffmpeg/compress-video.sh" alias convert-gif="bash $HOME/.local/scripts/ffmpeg/convert-gif-to-mp4.sh" +# chezetc fix for root shell +chezetc() { + if [[ $1 == cd ]]; then + local dir + if [[ -z $2 ]]; then + dir=${HOME}/.local/share/chezetc + else + dir=$(command chezetc source-path "$2") || return + fi + cd -- "$dir" || return + return + fi + command chezetc "$@" +} + # lazy lg() { lazygit "$@"