Added tab completion

This commit is contained in:
William Hilton 2015-07-17 01:25:50 -04:00
parent 26145b88a7
commit 2d51867efd
3 changed files with 53 additions and 5 deletions

8
get
View file

@ -10,7 +10,11 @@ list_branches() {
list_remote_branches() {
git for-each-ref refs/heads --format="%(refname:short)"
}
case "$1" in
"")
echo 'TODO: Display help, or git status if inside a repo'
;;
stage)
if [ -z "$2" ]; then
@ -76,7 +80,7 @@ else
fi
;;
update)
fetch)
echo Updating
if [ -z "$2" ]; then
git fetch --all
@ -108,12 +112,12 @@ status)
# TODO: figure out how to git config --global color.status always automatically.
git status \
| grep -v '# On branch' \
| grep -v '# (use "git push" to publish your local commits)' \
| grep -v '# (use "git reset HEAD <file>..." to unstage)' \
| grep -v '# (use "git add <file>..." to update what will be committed)' \
| grep -v '# (use "git checkout -- <file>..." to discard changes in working directory)' \
| grep -v '# (use "git add <file>..." to include in what will be committed)' \
| grep -v 'nothing added to commit but untracked files present (use "git add" to track)'
;;
diff)