use pager

thanks pawky
trunk
nbsp 2025-01-07 02:23:07 +02:00
parent 89525d4787
commit 3f11ec07c8
No known key found for this signature in database
GPG Key ID: 7184AC1C9835CE48
1 changed files with 1 additions and 1 deletions

View File

@ -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)
}