From 432b6182e4211632ed7588024374ef588113283b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Allan=20Krama=20Guimar=C3=A3es?= Date: Wed, 9 Oct 2024 11:42:08 -0300 Subject: [PATCH 1/2] grep - fix option availability check. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Allan Krama GuimarĂ£es --- lib/grep.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grep.sh b/lib/grep.sh index df48a9cc1..8ecd5c868 100644 --- a/lib/grep.sh +++ b/lib/grep.sh @@ -2,7 +2,7 @@ # is x grep argument available? function _omb_grep_flag_available { - : | grep "$1" "" >/dev/null 2>&1 + grep "$1" --help >/dev/null 2>&1 } _omb_grep_options=() From 9c75408e363869e24a502e9020ce46e30abe378f Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Mon, 14 Oct 2024 16:35:59 +0900 Subject: [PATCH 2/2] Update lib/grep.sh --- lib/grep.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grep.sh b/lib/grep.sh index 8ecd5c868..1679c6ce3 100644 --- a/lib/grep.sh +++ b/lib/grep.sh @@ -2,7 +2,7 @@ # is x grep argument available? function _omb_grep_flag_available { - grep "$1" --help >/dev/null 2>&1 + echo | grep "$1" "" >/dev/null 2>&1 } _omb_grep_options=()