jmlacroix / svn-color

bash function that adds colors to svn output
MIT License
46 stars 14 forks source link

Matching not strict enough - 'commit' matches #8

Open Goforhistory opened 7 years ago

Goforhistory commented 7 years ago

There needs to be a $ added after the round bracket in line 38. Otherwise the regular expression matches "commit" (and possibly other commands) and leads to a broken editor when committing without using '-m'.

< if [[ "$1" =~ ^($ACTIONS) ]] > if [[ "$1" =~ ^($ACTIONS)$ ]]

Tried committing with 'nano' and 'vim' as editor, both worked with the fix.