commit 75f5072cc87db95eb533f3e9dab9643468141b19 parent 86665e7390763b74826e179d4968b4a3dc49226d Author: Sebastiano Tronto <sebastiano@tronto.net> Date: Thu, 6 Jul 2023 17:05:51 +0200 Add feed source name to menu line Diffstat:
M | feed | | | 9 | ++++++++- |
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/feed b/feed @@ -39,7 +39,14 @@ getnew() { } showmenu() { - cat "$destdir"/* | $menu | awk '{print $NF}' | xargs $urlopener + for f in "$destdir"/*; do + ff=$(basename "$f") + if [ -s "$f" ]; then + while read -r line; do + printf '%20s %s\n' "$ff" "$line" + done < "$f" + fi + done | $menu | awk '{print $NF}' | xargs $urlopener } while getopts "m:" opt; do