From 1ab064a53f8ef076459303c5d13b3c7dea02a60b Mon Sep 17 00:00:00 2001 From: w30023233 Date: Thu, 12 Dec 2024 20:01:12 +0800 Subject: [PATCH] comp_compgen: option -C no longer checks if OPTARG is empty --- bash_completion | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bash_completion b/bash_completion index a6b707e9f58..6e11ca5b7b9 100644 --- a/bash_completion +++ b/bash_completion @@ -594,13 +594,7 @@ _comp_compgen() ;; c) _cur=$OPTARG ;; R) _cur="" ;; - C) - if [[ ! $OPTARG ]]; then - printf 'bash_completion: %s: -C: invalid directory name `%s'\''\n' "$FUNCNAME" "$OPTARG" >&2 - return 2 - fi - _dir=$OPTARG - ;; + C) _dir=$OPTARG ;; l) _has_ifs=set _ifs=$'\n' ;; F) _has_ifs=set _ifs=$OPTARG ;; [ix])