gum/examples/git-stage.sh
2022-08-02 13:56:40 -04:00

13 lines
271 B
Bash
Executable file

#!/bin/bash
ADD="Add"
RESET="Reset"
ACTION=$(gum choose "$ADD" "$RESET")
if [ "$ACTION" == "$ADD" ]; then
git status --short | cut -c 4- | gum choose --no-limit | xargs git add
else
git status --short | cut -c 4- | gum choose --no-limit | xargs git restore
fi