From 6b59c032a7e3a32988c7709f015257b57bdcc6db Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Sat, 18 May 2024 16:01:07 +0800 Subject: [PATCH] utils/shell: add `+` to safe shell characters `+` does not require escaping in the shell. (Not for Bash and Zsh, at least.) --- Library/Homebrew/utils/shell.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/shell.rb b/Library/Homebrew/utils/shell.rb index aee062fa90..186fc038e6 100644 --- a/Library/Homebrew/utils/shell.rb +++ b/Library/Homebrew/utils/shell.rb @@ -106,7 +106,7 @@ module Utils zsh: "~/.zshrc", }.freeze - UNSAFE_SHELL_CHAR = %r{([^A-Za-z0-9_\-.,:/@~\n])} + UNSAFE_SHELL_CHAR = %r{([^A-Za-z0-9_\-.,:/@~+\n])} sig { params(str: String).returns(String) } def csh_quote(str)