Properly evaluate command from PAGER string

PAGER may contain arguments.  See `man 1 man` for details.  See `man bash` for the explanation of `eval`.
This commit is contained in:
Alexei Zakharov
2017-08-31 11:35:27 -04:00
committed by Marco Vermeulen
parent 9754f6e2ba
commit 8b22e68ed7

View File

@@ -60,7 +60,7 @@ function __sdkman_secure_curl_with_timeouts {
function __sdkman_page {
if [[ -n "$PAGER" ]]; then
"$@" | $PAGER
"$@" | eval $PAGER
elif command -v less >& /dev/null; then
"$@" | less
else