commit b1e51b27cb486b0b74048325a107ba230973df7f parent fb9101b0a0d08af126dccc9835a21ceb1306d17b Author: hhvn <hayden@haydenvh.com> Date: Mon, 1 Feb 2021 14:27:01 +0000 bin/interface.sh: show From: header in menu_read Diffstat:
M | bin/interface.sh | | | 8 | +++++--- |
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/bin/interface.sh b/bin/interface.sh @@ -155,10 +155,12 @@ pager2(){ } menu_read(){ - file=$(awk -v "id1=${id%%.*}" -v "id2=${id##*.}" -F" " '$1 == id1 && $2 == id2 {print $6 " " $7}' < $datadir/boards/$board/list) id2=${id##*.} - cat $datadir/boards/$board/$(echo "$file" | sed -E 's/.* (.)/\1/') - pager2 < $datadir/boards/$board/$(echo "$file" | sed -E 's/.* (.)/\1/') + file=$(awk -v "id1=${id%%.*}" -v "id2=${id2}" -F" " '$1 == id1 && $2 == id2 {print $6 " " $7}' < $datadir/boards/$board/list) + from=$(awk -v "id1=${id%%.*}" -v "id2=${id2}" -F" " '$1 == id1 && $2 == id2 {print $4}' < $datadir/boards/$board/list) + fromf=$([ "$(userget $from realname)" != "$from" ] && echo "From: $(userget $from realname) <$from>" || echo "From: $from") + printf '%s\n\n' "$fromf" | cat /dev/stdin $datadir/boards/$board/$(echo "$file" | sed -E 's/.* (.)/\1/') + printf '%s\n\n' "$fromf" | cat /dev/stdin $datadir/boards/$board/$(echo "$file" | sed -E 's/.* (.)/\1/') | pager2 total_in_thread=$(awk -v "file=$(echo "$file" | sed 's/ .*//')" -F" " '$6 == file' < $datadir/boards/$board/list | wc -l) while prompt "($(($id2+1))/$total_in_thread) Ne${k}$([ $(($id2+1)) -eq $total_in_thread ] && printf "${e}")x${s}t ${k}$([ $id2 -eq 0 ] && printf "${e}")p${s}revious rep${k}$(check_reply_perm $board $user noprint)l${s}y ${k}b${s}oards b${k}a${s}ck ${k}h${s}elp" input do