aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2006-09-05 19:56:58 +0000
committerAvatar Mike Kelly <pioto@pioto.org> 2006-09-05 19:56:58 +0000
commit7d6e018fd161bf44b9d0103f0537d81286963194 (patch)
tree30f423fb6bfaf831c193524a434a89eda9b2aadf
parent5260ab390d2280773ae816ca95a224c21a71c16c (diff)
downloadpaludis-7d6e018fd161bf44b9d0103f0537d81286963194.tar.gz
paludis-7d6e018fd161bf44b9d0103f0537d81286963194.tar.xz
Add an option for the read action to show all new news items.
-rw-r--r--eselect/news.eselect11
1 files changed, 10 insertions, 1 deletions
diff --git a/eselect/news.eselect b/eselect/news.eselect
index daabe46..ca7dc36 100644
--- a/eselect/news.eselect
+++ b/eselect/news.eselect
@@ -142,7 +142,8 @@ describe_read_parameters() {
}
describe_read_options() {
- echo "target : News item ID (from 'list' action)"
+ echo "target : News item ID (from 'list' action), or the special" \
+ "item 'new', to list all new news items."
}
do_read() {
@@ -150,6 +151,14 @@ do_read() {
local i item= items
items=( $(get_unread ) )
+
+ if [[ "${1}" == "new" ]] ; then
+ for i in "${items[@]}" ; do
+ do_read "${i%::*}"
+ done
+ return
+ fi
+
for i in ${items[@]} ; do
[[ -n "${item}" ]] && break
[[ "${i%::*}" == "${1}" ]] || continue