1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:38:12 +00:00

Shell: Allow underscores in normal expansion names

This commit is contained in:
Ali Mohammad Pur 2023-02-16 21:36:52 +03:30 committed by Ali Mohammad Pur
parent a6d77162f4
commit d56fbaa7e8

View file

@ -773,7 +773,7 @@ Lexer::ReductionResult Lexer::reduce_parameter_expansion()
}
auto next = m_lexer.peek();
if (is_ascii_alphanumeric(next)) {
if (is_ascii_alphanumeric(next) || next == '_') {
m_state.buffer.append(consume());
expansion.parameter.append(next);
expansion.range.length = m_state.position.end_offset - expansion.range.start - m_state.position.start_offset;