From 8b22e68ed73dc9cd326e0bee0c635cb3fe041794 Mon Sep 17 00:00:00 2001 From: Alexei Zakharov Date: Thu, 31 Aug 2017 11:35:27 -0400 Subject: [PATCH] Properly evaluate command from PAGER string PAGER may contain arguments. See `man 1 man` for details. See `man bash` for the explanation of `eval`. --- src/main/bash/sdkman-utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/bash/sdkman-utils.sh b/src/main/bash/sdkman-utils.sh index 02917646..47aac23f 100644 --- a/src/main/bash/sdkman-utils.sh +++ b/src/main/bash/sdkman-utils.sh @@ -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