Created
April 14, 2016 12:54
-
-
Save scop/69f72ea2720ae2d54f278b102907faa1 to your computer and use it in GitHub Desktop.
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
diff --git a/completions/man b/completions/man | |
index e1b587d..628e43c 100644 | |
--- a/completions/man | |
+++ b/completions/man | |
@@ -56,17 +56,10 @@ _man() | |
return 0 | |
fi | |
- local manpath | |
- if [[ $OSTYPE == *@(darwin|linux|freebsd|cygwin)* ]] || _userland GNU; then | |
- manpath=$( manpath 2>/dev/null || command man -w ) | |
- else | |
- manpath=$MANPATH | |
- fi | |
- | |
- if [[ -z $manpath ]]; then | |
- COMPREPLY=( $( compgen -c -- "$cur" ) ) | |
- return 0 | |
- fi | |
+ local manpath="$MANPATH" | |
+ [[ -z $manpath ]] && \ | |
+ manpath=$( manpath 2>/dev/null || command man -w 2>/dev/null ) | |
+ [[ -z $manpath ]] && manpath="/usr/share/man:/usr/local/share/man" | |
# determine manual section to search | |
local sect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment