Skip to content

Instantly share code, notes, and snippets.

@sirhc
Created April 5, 2013 16:36
Show Gist options
  • Save sirhc/5320702 to your computer and use it in GitHub Desktop.
Save sirhc/5320702 to your computer and use it in GitHub Desktop.
Perldoc/cpandoc wrapper
#!/bin/bash
pd=$(type -P cpandoc)
pd=${pd:-"$(type -P perldoc)"}
$pd -f "$@" 2>/dev/null && exit
$pd "$@" 2>/dev/null && exit
$pd -q "$@" 2>/dev/null && exit
man "$@" 2>/dev/null && exit
echo "$0: $@: No match" 1>&2
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment