diff --git a/completions/mr b/completions/mr index 9bef629cb0d..660dfd8d7e1 100644 --- a/completions/mr +++ b/completions/mr @@ -16,7 +16,7 @@ _comp_cmd_mr() done )" # Split [online|offline] and remove `action` placeholder. - commands="${commands//@(action|[\[\|\]])/$'\n'}" + commands="${commands//@(action|[\[\|\]])/ }" # Add standard aliases. commands="${commands} ci co ls" _comp_split commands "$commands" diff --git a/test/runLint b/test/runLint index a182d3fd286..f51bedb72a7 100755 --- a/test/runLint +++ b/test/runLint @@ -67,3 +67,6 @@ gitgrep "$cmdstart"'((set|shopt)\s+[+-][a-z]+\s+posix\b|(local\s+)?POSIXLY_CORRE gitgrep '\$\{([^{}\n]|\{.*\})+/([^{}\n]|\{.*\})+/([^{}"\n]|\{.*\})*\$.*\}' \ '$rep of ${var/pat/$rep} needs to be double-quoted for shopt -s patsub_replacement (bash >= 5.2)' + +gitgrep '"([^"\n]|\\.)*\$\{([^{}\n]|\{.*\})+/([^{}\n]|\{.*\})+/([^{}"\n]|\{.*\})*"([^{}"\n]|\{.*\})*\$.*\}' \ + '$rep of "${var/pat/"$rep"}" should not be quoted for bash-4.2 or shopt -s compat42 (bash >= 4.3)'