Skip to content

Commit 9db240e

Browse files
debian: deadbranch tui clean unwanted branches
1 parent ce17f32 commit 9db240e

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

debian-linux/tui/deadbranch.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
echo
4+
echo "# ---------------------------------------"
5+
echo "Deadbranch - remove git branches"
6+
dra download --automatic --install --output ~/.local/bin/ armgabrielyan/deadbranch
7+
8+
if [[ $SHELL == "/bin/bash" ]]; then
9+
mkdir -p ~/.local/share/bash-completion/completions/
10+
deadbranch --completions bash > ~/.local/share/bash-completion/completions/deadbranch
11+
12+
elif [[ $SHELL == "/usr/bin/zsh" || $SHELL == "/bin/zsh" ]]; then
13+
mkdir -p ~/.local/share/zsh-completion
14+
deadbranch completions zsh > ~/.local/share/zsh-completion/_deadbranch
15+
else
16+
echo "Unknown SHELL, completions will not be generated"
17+
exit
18+
fi
19+
20+
# Recommended zsh completion
21+
# mkdir -p ~/.zfunc
22+
# deadbranch completions zsh >~/.zfunc/_deadbranch
23+
#
24+
# add to ~/.zshrc before compinit call (or add it if you don't have one):
25+
#
26+
# fpath=(~/.zfunc $fpath)
27+
# autoload -Uz compinit && compinit
28+
29+
echo
30+
echo "Deadbranch version: $(deadbranch --version)"
31+
echo "# ---------------------------------------"
32+
echo

0 commit comments

Comments
 (0)