Skip to content

Instantly share code, notes, and snippets.

@badgateway666
Created December 10, 2019 21:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badgateway666/903d55ba0acc9af617059d4b1dd2e5ad to your computer and use it in GitHub Desktop.
Save badgateway666/903d55ba0acc9af617059d4b1dd2e5ad to your computer and use it in GitHub Desktop.
megaman
#!/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