From ebd79fc60154f6fb3152e92b7c2cee4f2b9cfa91 Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Fri, 2 Jun 2023 11:16:28 +1000 Subject: [PATCH] Comment parent IDs are back (server now supplies a full path instead), and newest comments are shown (in order) instead of whatever default is. That should become configurable, and better in other ways, later. --- commands/lurking.sh | 2 +- pretty.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/lurking.sh b/commands/lurking.sh index 2218a9a..5210c55 100644 --- a/commands/lurking.sh +++ b/commands/lurking.sh @@ -3,4 +3,4 @@ notifs(){ getauth "user/replies" ".replies | reverse | $notifs"; } notifs2(){ getauth "user/mention" ".mentions | reverse | $notifs"; } home(){ getauth "post/list" ".posts | $posts" "type_=Subscribed"; } #This has to get complex now -.- -comments(){ getauth "post" "(.post_view | $showpost)" "id=$1"; getauth "comment/list" "(.comments | reverse | $comments_view)" "post_id=$1"; } +comments(){ getauth "post" "(.post_view | $showpost)" "id=$1"; getauth "comment/list" "(.comments | reverse | $comments_view)" "post_id=$1&sort=New"; } diff --git a/pretty.sh b/pretty.sh index 234dbb1..ad9f5e8 100644 --- a/pretty.sh +++ b/pretty.sh @@ -8,7 +8,7 @@ postsummary='(.post | (.id | tostring)+" "+(.name | tostring)), (.post.url)+", "+(.creator.display_name // .creator.name)+":", ((.comment // .post) | .published), ""' -showcomment='(.comment | (.parent_id | tostring)+"->"+(.id | tostring))+", "+(.creator.display_name // .creator.name)+":", +showcomment='(.comment | .path[2:])+", "+(.creator.display_name // .creator.name)+":", ((.comment // .post) | .published, (.body // .content)), ""'