File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ git pad list
187187
188188## To-Dos <small ><sup >[ ▲] ( #table-of-contents ) </sup ></small >
189189
190- * ~~ auto-completion~~ : enable <TAB > after ` git pad ` or ` git pad edit `
190+ * ~~ auto-completion~~ : enable ` <TAB> ` after ` git pad ` or ` git pad edit `
191191
192192* Different Template for Issue types
193193 * Current, only one ` TEMPLATE.md ` for all issues
Original file line number Diff line number Diff line change 1- #! /bin/bash
1+ #! /usr/ bin/env bash
22# shellcheck disable=SC2016
33if [ ! -f " git-pad" ] || [ ! -f " autocompletion.sh" ]; then
44 echo ' !E: Not in git-pad directory' ;
99## git-pad
1010PATH=$PATH:' " $PWD " ' ;
1111export PATH;
12- source ' " $( realpath autocompletion.sh) ;"
12+ . ' " $PWD / autocompletion.sh;"
1313
1414shell_name=" $( basename " $SHELL " ) "
1515
@@ -19,4 +19,10 @@ case "$shell_name" in
1919 * ) echo " Unsupported shell" ; exit 1 ;;
2020esac
2121
22- grep -q ' ## git-pad' " $rc " 2> /dev/null || echo " $block " >> " $rc "
22+ if grep -q ' ## git-pad' " $rc " 2> /dev/null; then
23+ echo ' !W: Looks like it is already installed'
24+ echo ' --------------------------------------'
25+ grep -C 5 ' ## git-pad' " $rc "
26+ else
27+ echo " $block " >> " $rc " && echo " Installed successfully. Restart your shell."
28+ fi
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ source ./autocompletion.sh
2020
2121# Simulate:
2222# git pad e<TAB>
23+ echo ' - Testing git pad e<TAB>'
2324COMP_WORDS=(git pad e)
2425COMP_CWORD=2
2526COMP_LINE=" git pad e"
You can’t perform that action at this time.
0 commit comments