batman: redirect stderr to /dev/null when rendering preview

To avoid preview being flooded by garbage warnings.
This commit is contained in:
CorteX 2023-12-09 21:39:53 +08:00 committed by GitHub
parent a686d6742c
commit e492424567
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,7 @@ if [[ "${#MAN_ARGS[@]}" -eq 0 ]] && [[ -z "$BATMAN_LEVEL" ]] && command -v "$EXE
echo {1} \ echo {1} \
| sed 's/, /\n/g;' \ | sed 's/, /\n/g;' \
| sed 's/\([^(]*\)(\([0-9A-Za-z ]\))/\2\t\1/g' \ | sed 's/\([^(]*\)(\([0-9A-Za-z ]\))/\2\t\1/g' \
| BAT_STYLE=plain xargs -n2 batman --color=always --paging=never | BAT_STYLE=plain xargs -n2 batman --color=always --paging=never 2> /dev/null
")" ")"
if [[ -z "$selected_page" ]]; then if [[ -z "$selected_page" ]]; then