aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2010-03-21 10:01:46 +0000
committerUlrich Müller <ulm@gentoo.org>2010-03-21 10:01:46 +0000
commitaee987c3dd463d06b1b61c1fd89dc9c2839e2c9b (patch)
tree261dced7d7c77f2c65cab68aebac73997081b6fd /modules/news.eselect
parentRemove pico from default editor list. (diff)
downloadeselect-aee987c3dd463d06b1b61c1fd89dc9c2839e2c9b.tar.gz
eselect-aee987c3dd463d06b1b61c1fd89dc9c2839e2c9b.tar.bz2
eselect-aee987c3dd463d06b1b61c1fd89dc9c2839e2c9b.zip
Add --quiet option to suppress output.
svn path=/trunk/; revision=769
Diffstat (limited to 'modules/news.eselect')
-rw-r--r--modules/news.eselect7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/news.eselect b/modules/news.eselect
index 67b26f5..973072c 100644
--- a/modules/news.eselect
+++ b/modules/news.eselect
@@ -227,6 +227,7 @@ describe_read() {
describe_read_options() {
echo "--mbox : Output in mbox format"
+ echo "--quiet : Suppress output, only change status"
echo "--raw : Output in raw format"
echo "new : Read unread news items (default)"
echo "all : Read all news items"
@@ -245,6 +246,7 @@ do_read() {
while [[ $# -gt 0 ]]; do
case ${1##--} in
mbox) format=mbox ;;
+ quiet|silent) format=null ;;
raw) format=raw ;;
*) break ;;
esac
@@ -322,10 +324,13 @@ do_read() {
false
fi
;;
+ null)
+ true
+ ;;
esac
[[ $? -ne 0 ]] \
&& write_warning_msg "News item \"${item}\" no longer exists"
- echo
+ [[ ${format} != null ]] && echo
[[ ${stat} = unread ]] || continue
# move from "unread" to "read"