Lines 274-280
do_read() {
Link Here
|
274 |
&& echo "No news is good news." |
274 |
&& echo "No news is good news." |
275 |
fi |
275 |
fi |
276 |
|
276 |
|
|
|
277 |
local tmp tmpdir tmpfiles=() |
278 |
tmpdir=$(mktemp --tmpdir -d eselect.news.XXX) || die 'unable to create tmpdir' |
279 |
|
280 |
exec 3>&1 |
277 |
for i; do |
281 |
for i; do |
|
|
282 |
tmp=$tmpdir/$i |
283 |
tmpfiles+=("$tmp") |
284 |
exec >"$tmp" |
285 |
|
278 |
if ! is_number "${i}" || [[ ${i} -lt 1 || ${i} -gt ${#items[@]} ]] |
286 |
if ! is_number "${i}" || [[ ${i} -lt 1 || ${i} -gt ${#items[@]} ]] |
279 |
then |
287 |
then |
280 |
write_warning_msg "Bad item number: ${i}" |
288 |
write_warning_msg "Bad item number: ${i}" |
Lines 349-354
do_read() {
Link Here
|
349 |
has ${repo} ${repos_upd} || repos_upd="${repos_upd} ${repo}" |
357 |
has ${repo} ${repos_upd} || repos_upd="${repos_upd} ${repo}" |
350 |
done |
358 |
done |
351 |
|
359 |
|
|
|
360 |
exec >&3 3>&- |
361 |
if ((${#tmpfiles[*]} )); then |
362 |
if [[ -n $PAGER ]] && [[ -t 0 && -t 2 ]]; then |
363 |
$PAGER "${tmpfiles[@]}" |
364 |
else |
365 |
cat "${tmpfiles[@]}" |
366 |
fi |
367 |
fi |
368 |
rm -fr "$tmpdir" |
369 |
|
352 |
# update lists of read/unread items |
370 |
# update lists of read/unread items |
353 |
for repo in ${repos_upd}; do |
371 |
for repo in ${repos_upd}; do |
354 |
write_item_list read ${repo} && write_item_list unread ${repo} |
372 |
write_item_list read ${repo} && write_item_list unread ${repo} |