Skip to content

Commit 28a61e8

Browse files
authored
Merge pull request #96 from hansalves/openfilter
git issue list: only show open issues unless -a is passed
2 parents ebba33c + ef2e7b4 commit 28a61e8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

git-issue.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,14 +1145,22 @@ sub_list()
11451145
esac
11461146
shift $((OPTIND - 1));
11471147
tag="$1"
1148-
: "${tag:=open}"
1148+
if [ "$tag" = "closed" ] ; then
1149+
# when explicitly searching for closed tickets, don't show only open ones
1150+
all=1
1151+
fi
11491152
cdissues
11501153
test -d issues || exit 0
11511154
find issues -type f -name tags -o -name milestone |
1155+
if [ "$tag" ] ; then
1156+
xargs grep -Flx "$tag"
1157+
else
1158+
cat
1159+
fi |
11521160
if [ "$all" ] ; then
11531161
cat
11541162
else
1155-
xargs grep -Flx "$tag"
1163+
sed 's/\/milestone$/\/tags/' | xargs grep -Flx open
11561164
fi |
11571165
# Convert list of tag or milestone file paths into the corresponding
11581166
# directory and issue id

0 commit comments

Comments
 (0)