home/git: fzf -> skim, coreutils -> uutils

This commit is contained in:
2025-02-26 09:57:55 +01:00
parent 0bd882eb1a
commit ea12f16718
3 changed files with 4 additions and 4 deletions

View File

@@ -339,12 +339,12 @@ in
}) })
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "git-fixup-interactive"; name = "git-fixup-interactive";
runtimeInputs = with pkgs; [ cfg.package gnused gnugrep fzf ]; runtimeInputs = with pkgs; [ cfg.package gnused gnugrep skim ];
text = lib.fileContents ./scripts/git-fixup-interactive.sh; text = lib.fileContents ./scripts/git-fixup-interactive.sh;
}) })
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "git-switch-interactive"; name = "git-switch-interactive";
runtimeInputs = with pkgs; [ cfg.package fzf gnused coreutils ]; runtimeInputs = with pkgs; [ cfg.package skim gnused gnugrep uutils-coreutils-noprefix ];
text = lib.fileContents ./scripts/git-switch-interactive.sh; text = lib.fileContents ./scripts/git-switch-interactive.sh;
excludeShellChecks = [ excludeShellChecks = [
"SC2001" # (style): See if you can use ${variable//search/replace} instead. (sed invocation) "SC2001" # (style): See if you can use ${variable//search/replace} instead. (sed invocation)

View File

@@ -9,7 +9,7 @@ FORK_POINT=$(git merge-base --fork-point "$TARGET_BRANCH")
COMMITS_SINCE_FORK_POINT=$(git log --format=format:'%s' "$FORK_POINT"..HEAD | grep -v -E '^fixup!') COMMITS_SINCE_FORK_POINT=$(git log --format=format:'%s' "$FORK_POINT"..HEAD | grep -v -E '^fixup!')
RESULT=$(fzf <<<"$COMMITS_SINCE_FORK_POINT") RESULT=$(sk <<<"$COMMITS_SINCE_FORK_POINT")
if [ "$RESULT" == "" ]; then if [ "$RESULT" == "" ]; then
echo "Doing nothing..." echo "Doing nothing..."

View File

@@ -6,7 +6,7 @@ if [ -n "${1:-}" ]; then
fi fi
BRANCHES=$(cat <(git branch) <(git branch --remotes) | grep --invert-match '^\*\|HEAD ->' | sed 's|^\s*||') BRANCHES=$(cat <(git branch) <(git branch --remotes) | grep --invert-match '^\*\|HEAD ->' | sed 's|^\s*||')
CHOSEN_BRANCH=$(fzf --reverse --info=inline --preview 'git show --color {}' <<<"$BRANCHES") CHOSEN_BRANCH=$(sk --reverse --info=inline --preview 'git show --color {}' <<<"$BRANCHES")
CLEAN_BRANCH_NAME=$(sed 's|^\s*||' <<<"$CHOSEN_BRANCH") CLEAN_BRANCH_NAME=$(sed 's|^\s*||' <<<"$CHOSEN_BRANCH")
for REMOTE in $(git remote); do for REMOTE in $(git remote); do