From b63074795a7a32dddd9b5d96e084d0e29bb6844e Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 22 Sep 2025 09:59:11 +0200 Subject: [PATCH] Run `gfold` when `s` is not in a git repo --- modules/cli/zsh/default.nix | 1 - modules/cli/zsh/init.zsh | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/cli/zsh/default.nix b/modules/cli/zsh/default.nix index bcdeb1c..75fb948 100644 --- a/modules/cli/zsh/default.nix +++ b/modules/cli/zsh/default.nix @@ -26,7 +26,6 @@ bat = "bat -p"; # git stuff - s = "git status"; gs = "git status"; gl = "git log"; gu = "git pull"; diff --git a/modules/cli/zsh/init.zsh b/modules/cli/zsh/init.zsh index 893d538..9241559 100644 --- a/modules/cli/zsh/init.zsh +++ b/modules/cli/zsh/init.zsh @@ -89,6 +89,13 @@ proxy() { ssh -NR "5000:localhost:$1" zoriya@ssh.sdg.moe } +s() { + git status 2>/dev/null + if [[ $? -ne 0 ]]; then + gfold + fi +} + # keep yq's output in yaml & colorizes it yq() { # if `-r` is in the arguments, do not add the -Y flag because it breaks yq.