scmbreeze / scm_breeze

Adds numbered shortcuts to the output git status, and much more
https://madebynathan.com/2011/10/19/git-shortcuts-like-youve-never-seen-before/
MIT License
2.82k stars 191 forks source link

Unable to use in cygwin. Bash script fails with unexpected EOF #178

Open bigkahuna1uk opened 9 years ago

bigkahuna1uk commented 9 years ago

Trying to use in Cygwin but in ~/.scm_breeze/lib/git/tools.sh I get an error when I source ~/.bashrc

git_remove_history() {

Make sure we're at the root of a git repo

if [ ! -d .git ]; then echo "Error: must run this script from the root of a git repository" return fi

Remove all paths passed as arguments from the history of the repo

files=$@ $_git_cmd filter-branch --index-filter "$_git_cmd rm -rf --cached --ignore-unmatch ${files}" HEAD

Remove the temporary history git-filter-branch otherwise leaves behind for a long time

rm -rf .git/refs/original/ && $_git_cmd reflog expire --all && $_git_cmd gc --aggressive --prune }

Culprit seems to be in the last line: rm -rf .git/refs/original/ && $_git_cmd reflog expire --all && $_git_cmd gc --aggressive --prune

I get the following error:

bash: tools.sh: line 29: unexpected EOF while looking for matching ``'

bigkahuna1uk commented 9 years ago

Actually not just for tools.sh

$ source scm_breeze.sh bash: ./lib/scm_breeze.sh: line 52: unexpected EOF while looking for matching ' bash: ./lib/scm_breeze.sh: line 74: syntax error: unexpected end of file bash: ./lib/design.sh: line 88: unexpected EOF while looking for matching' bash: ./lib/design.sh: line 107: syntax error: unexpected end of file bash: ./lib/git/tools.sh: line 29: unexpected EOF while looking for matching ``' bash: ./lib/git/tools.sh: line 147: syntax error: unexpected end of file

Thanks in advance for any guidance offered.