man -k . | fzf -e --tiebreak=begin | awk '{print $1}' | xargs man -Tpdf | zathura -
# searches for a man page and then outputs it as pdf to zathura
This command lets the user choose a man page, and then displays the page. It works great, other than zathura starting blank while it waits for the user to make their selection, which leads to zathura getting input. It is really annoying having to change focus from zathura back to the terminal and then back to zathura.
I am fairly new to scripting so I thought that there might be a way around this that I just don't know about.
Preferably not ifne
.
ifne
) in the question body. Then I (or somebody else) will probably post an answer that matches your case better. A straightforward solution is: redirectxargs man …
to a regular file, then letzathura
read the file. – Kamil Maciorowski Apr 06 '21 at 11:34