Set standard input of 'man' process to os.Stdin

This commit is contained in:
Junegunn Choi 2024-06-01 13:23:46 +09:00
parent 41bcbe342f
commit 564daf9a7d
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -88,6 +88,7 @@ func main() {
}
defer os.Remove(file)
cmd := exec.Command("man", file)
cmd.Stdin = os.Stdin
cmd.Stdout = os.Stdout
if err := cmd.Run(); err != nil {
fmt.Print(string(manPage))