23 lines
655 B
Bash
Executable file
23 lines
655 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
export FZF_DEFAULT_OPTS="--layout=reverse --height=20 --no-mouse -i"
|
|
export FZF_TMUX_HEIGHT=20
|
|
export ACTIONS=("u update" "c create" "m manifest" "r remove" "f fix" "t features" "U utility" "o other")
|
|
|
|
main() {
|
|
local atom
|
|
atom="$(find . -mindepth 2 -maxdepth 2 -type d -not -path './.git/*' -printf "%P\n" | fzf --prompt 'Atom: ' || echo '')"
|
|
|
|
local action
|
|
action="$(printf "%s\n" "${ACTIONS[@]}" | fzf | awk '{ print $1 }')"
|
|
|
|
{ [ "$action" == 'o' ] || [ ! "$action" ]; } && read -rp "Enter action: " action
|
|
|
|
git add -A
|
|
git commit -S -m "${action} ${atom}"
|
|
git push -u origin main
|
|
}
|
|
|
|
main "$@"
|