Skip to content

refactor: abbrevation expansion trait logic#1094

Merged
fdncred merged 4 commits into
nushell:mainfrom
casedami:refactor/better-abbr-veto
Jun 8, 2026
Merged

refactor: abbrevation expansion trait logic#1094
fdncred merged 4 commits into
nushell:mainfrom
casedami:refactor/better-abbr-veto

Conversation

@casedami

@casedami casedami commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

as discussed in nushell/nushell#18315

renames is_inside_string_literal to should_expand_abbr and adds an AbbrExpandContext parameter so that the client can define AST expansion logic according to the expansion context (ie 'bang expansion' or 'fish-style expansion')

i would say that the existing abbreviation tests are sufficient on the reedline side of things, especially since the main behavior change will come from nushell

casedami and others added 3 commits May 20, 2026 16:01
make abbreviation expansion logic more generic so that the client
can define expansion veto logic for different abbreviation contexts
Comment thread src/highlighter/mod.rs
@kronberger-droid

Copy link
Copy Markdown
Collaborator

Any blockers for this to merge? Other than a breaking change note (!).
@fdncred @casedami

@fdncred

fdncred commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Any blockers for this to merge? Other than a breaking change note (!).

No. My only question is if this fixes the nushell issue on it's own or if there is code needed on the nushell side to fix it there.

@casedami

casedami commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

It needs code on the nushell side to fix, I have a PR ready for that I just haven't submitted it yet.

@fdncred fdncred merged commit 13fe34a into nushell:main Jun 8, 2026
7 checks passed
@fdncred

fdncred commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

ok, thanks. reedline commits are building up so hopefully patching nushell to the latest reedline commit doesn't break anything else.

@kronberger-droid

Copy link
Copy Markdown
Collaborator

ok, thanks. reedline commits are building up so hopefully patching nushell to the latest reedline commit doesn't break anything else.

I think this one is the only one that could really break anything. Everything else is just exposing things in nushell`s config or is non-breaking.
I will try to keep the markdown note updated.

@fdncred

fdncred commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

@kronberger-droid Great! @casedami Ping me when you have your nushell PR up. Thanks for all the help!

kronberger-droid pushed a commit to kronberger-droid/reedline that referenced this pull request Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants