batman: Only parse first manpage when selected

This commit is contained in:
Ethan P 2023-03-21 01:26:11 -07:00
parent f07a22d536
commit e53db161a7
No known key found for this signature in database
GPG Key ID: A15E33AC0325A3F5

View File

@ -60,7 +60,7 @@ if [[ "${#MAN_ARGS[@]}" -eq 0 ]] && [[ -z "$BATMAN_LEVEL" ]] && command -v "$EXE
# Convert the page(section) format to something that can be fed to the man command.
while read -r line; do
if [[ "$line" =~ ^(.*)\(([0-9a-zA-Z]+)\)$ ]]; then
if [[ "$line" =~ ^(.*)\(([0-9a-zA-Z]+)\) ]]; then
MAN_ARGS+=("${BASH_REMATCH[2]}" "$(echo ${BASH_REMATCH[1]} | xargs)")
fi
done <<< "$selected_page"