Skip to content
Browse files

Fixes multiple matches selection

Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
  • Loading branch information...
1 parent a5392d5 commit 89e204744219178b03daa331b9dabe0171142eae @jweslley jweslley committed with tj Nov 10, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 bin/git-ignore
View
2 bin/git-ignore
@@ -9,7 +9,7 @@ done
if [ ! -z "$template" ]; then
gitignoredir="`dirname $0`/../etc/gitignore"
- selected_template=$(find $gitignoredir -type f -name *.gitignore | xargs -i basename {} .gitignore | grep -i $template)
+ selected_template=$(find $gitignoredir -type f -name *.gitignore | xargs -i basename {} .gitignore | sort | grep $template)
count=$(echo $selected_template | wc -w)
case "$count" in
0) echo "The pattern '$template' does not match any available templates." && exit 1;;

0 comments on commit 89e2047

Please sign in to comment.
Something went wrong with that request. Please try again.