Skip to content

Commit

Permalink
Land #18032, Escape braces after all in cmd/brace encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
gwillcox-r7 committed May 30, 2023
2 parents 4da0049 + f5bec51 commit d194cf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/encoders/cmd/brace.rb
Expand Up @@ -27,7 +27,7 @@ def encode_block(state, buf)
return buf if state.badchars !~ /\s/

# Perform brace expansion encoding
"{#{buf.gsub(',', '\\,').gsub(/\s+/, ',')}}"
"{#{buf.gsub(/([{,}])/, '\\\\\1').gsub(/\s+/, ',')}}"
end

end

0 comments on commit d194cf2

Please sign in to comment.