mirror of
https://github.com/eth-p/bat-extras.git
synced 2025-02-12 07:09:13 +01:00
batman: Only parse first manpage when selected
This commit is contained in:
parent
f07a22d536
commit
e53db161a7
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user