Created
December 10, 2019 21:41
-
-
Save badgateway666/903d55ba0acc9af617059d4b1dd2e5ad to your computer and use it in GitHub Desktop.
megaman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -lt 1 ]; then | |
selection=$(man -k . | fzf | cut -f1 -d " ") | |
if [ -z selection ]; then | |
exit | |
fi | |
if man "$var" > /dev/null 2>&1 | |
then | |
man -Tpdf "$var" | zathura - & | |
fi | |
exit | |
fi | |
if [ $# -gt 0 ]; then | |
for var in "$@"; do | |
if man "$var" > /dev/null 2>&1 | |
then | |
man -Tpdf "$var" | zathura - & | |
fi | |
done | |
exit | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment