You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
543 B
29 lines
543 B
13 years ago
|
#
|
||
|
# Displays a README of OMZ or OMZ modules
|
||
|
#
|
||
|
# Authors:
|
||
|
# Sebastian Wiesner <lunaryorn@googlemail.com>
|
||
|
#
|
||
|
|
||
|
local -a readmes
|
||
|
local readme
|
||
|
|
||
|
if (( $# == 0 )); then
|
||
|
readmes=("$OMZ/README.md")
|
||
|
else
|
||
|
for module in "$argv[@]"; do
|
||
|
readme="$OMZ/modules/$module/README.md"
|
||
|
if [[ -f $readme ]]; then
|
||
|
readmes+=("$readme")
|
||
|
elif [[ ! -d "$OMZ/modules/$module" ]]; then
|
||
|
print "unknown module $module" >&2
|
||
|
else
|
||
|
print "no README in module $module" >&2
|
||
|
fi
|
||
|
done
|
||
|
fi
|
||
|
|
||
|
if (( $#readmes )); then
|
||
|
$PAGER "$readmes[@]"
|
||
|
fi
|