Created
June 21, 2013 17:35
-
-
Save sirhc/5832879 to your computer and use it in GitHub Desktop.
Try a bunch of perldoc commands to find documentation, finally failing over to man.
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 | |
# | |
# Vim configuration for pd (~/.vim/after/ftplugin/perl.vim): | |
# :setlocal keywordprg=pd | |
# :setlocal iskeyword+=:,$,@,% | |
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