You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bashisms don't work when typing string arguments #18315
we want to decouple string detection from external arg detection as far as expanding abbreviations go. correct me if im wrong: for bashism abbreviations, i think we don't want expansion within a string but we do want it as an external arg; for fish-style abbreviations we don't want expansions for either.
so i think there are two ways to go about this:
add another function to the Highlighter trait, something like is_external_arg
rename is_inside_string_literal to something like should_expand_abbr which would take a parameter defining the union of FlatShape that would veto an abbreviation expansion
then each expansion type can define when they expand/dont expand accordingly
Activity
casedami commentedon May 30, 2026
My initial guess as to the cause would be the expansions being parsed as
ExternalArgand thereforeis_inside_string_literalis returning Truefdncred commentedon May 31, 2026
That stinks! @casedami Can you take a closer look when you have time? It makes me think we don't have any bashism tests too. 🤔
casedami commentedon May 31, 2026
Sure, i can investigate the bashism tests also
fdncred commentedon May 31, 2026
Thank you. It's much appreciated!
casedami commentedon Jun 2, 2026
for context, right now this behavior comes from
where within
is_inside_string_literalwe addedFlatShape::ExternalArgto the match statementwe want to decouple string detection from external arg detection as far as expanding abbreviations go. correct me if im wrong: for bashism abbreviations, i think we don't want expansion within a string but we do want it as an external arg; for fish-style abbreviations we don't want expansions for either.
so i think there are two ways to go about this:
Highlightertrait, something likeis_external_argis_inside_string_literalto something likeshould_expand_abbrwhich would take a parameter defining the union ofFlatShapethat would veto an abbreviation expansionthen each expansion type can define when they expand/dont expand accordingly
fdncred commentedon Jun 3, 2026
Option 2 sounds best to me. Thanks for looking into this.
casedami commentedon Jun 3, 2026
Np, I can submit PRs for this sometime this week
fix: use new highlighter api for better abbr expansion (#18390)