mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Fixes multiple matches selection
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
This commit is contained in:
parent
a5392d54c3
commit
89e2047442
|
|
@ -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;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue