From 3f11ec07c8600370ad12987bcd7bda3dfa11382b Mon Sep 17 00:00:00 2001 From: nbsp Date: Tue, 7 Jan 2025 02:23:07 +0200 Subject: [PATCH] use pager thanks pawky --- app/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/user.go b/app/user.go index 7f37130..bb21866 100644 --- a/app/user.go +++ b/app/user.go @@ -86,7 +86,7 @@ func showPost(state *ui.State, post ttbp.Post) { vt.TERM = os.Getenv("TERM") vt.Attach(state.PostEvent()) vt.Focus() - err := vt.Start(exec.Command("less", path.Join("/home", post.Author, ".ttbp/entries", post.Date.Format("20060102")+".txt"))) + err := vt.Start(exec.Command(os.ExpandEnv(os.Getenv("PAGER")), path.Join("/home", post.Author, ".ttbp/entries", post.Date.Format("20060102")+".txt"))) if err != nil { panic(err) }