diff --git a/app/user.go b/app/user.go index bb21866..3037869 100644 --- a/app/user.go +++ b/app/user.go @@ -86,7 +86,11 @@ func showPost(state *ui.State, post ttbp.Post) { vt.TERM = os.Getenv("TERM") vt.Attach(state.PostEvent()) vt.Focus() - err := vt.Start(exec.Command(os.ExpandEnv(os.Getenv("PAGER")), path.Join("/home", post.Author, ".ttbp/entries", post.Date.Format("20060102")+".txt"))) + pager := os.ExpandEnv(os.Getenv("PAGER")) + if pager == "" { + pager = "less" + } + err := vt.Start(exec.Command(pager, path.Join("/home", post.Author, ".ttbp/entries", post.Date.Format("20060102")+".txt"))) if err != nil { panic(err) }