From 4ffd8018367f6e1d80c8d5a6f84fa87db8723b2b Mon Sep 17 00:00:00 2001 From: Riley Apeldoorn Date: Thu, 15 Jun 2023 20:41:51 +0200 Subject: [PATCH] Add shell alias to list staged files --- shared/home/bash.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shared/home/bash.nix b/shared/home/bash.nix index 5d875d4..52a92d7 100644 --- a/shared/home/bash.nix +++ b/shared/home/bash.nix @@ -46,7 +46,8 @@ in with lib; { "uncommit" = "git reset --soft HEAD~"; # Git selectors - ".changed" = "git diff --name-only"; + ".changed" = "git diff --diff-filter=AM --name-only"; + ".staged" = "git diff --diff-filter=AM --name-only --cached"; ".conflicted" = "git status --porcelain | rg '^UU' | sd '^.. ' ''"; ".branches" = "git branch -a | rg -v '\*|HEAD' | sd 'remotes/origin/' '' | sd '^ *' '' | uniq";