Skip to content

fix: use new highlighter api for better abbr expansion - #18390

Merged
fdncred merged 4 commits into
nushell:mainfrom
casedami:main
Jun 11, 2026
Merged

fdncred merged 4 commits into
nushell:mainfrom
casedami:main

Conversation

@casedami

Copy link
Copy Markdown
Contributor

Description

User-facing changes (Release notes)

Additional notes

sorry been busy this week so i was delayed getting this up @fdncred

note that for internal calls such as echo the expansion 'bug' described in #18315 would still occur since the bang expression is parsed as a string which we've marked as a non-expansion condition. not sure if/how we want to get around that.

also, running cargo update -p reedline isn't updating reedline to the latest commit -- any help there?

@casedami
casedami marked this pull request as draft June 10, 2026 20:59
@fdncred

fdncred commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

cargo update -p reedline

you have to uncomment this line I think and then do that cargo update -p reedline and it should update the Cargo.toml and Cargo.lock file. The .lock file is what you'll need to check for proper updates.

# reedline = { git = "https://github.com/nushell/reedline", branch = "main" }

@fdncred

fdncred commented Jun 11, 2026 •

Copy link
Copy Markdown
Contributor

I pushed an update to update to the latest commit in reedline.

@casedami We want bashisms to work as they did before as much as possible so echo hi and then echo !$ should be echo hi. Can you make it do that?

@casedami

Copy link
Copy Markdown
Contributor Author

Yeah i can do that

@casedami

Copy link
Copy Markdown
Contributor Author

i think this would require removing any restrictions on the bashisms expansion veto since in a command like echo !!, !! registers as Flatshape::String (for context, strings are the only shape that vetoes bashism expansion).

we could add a mechanism for expanding bashisms that is not enter or space so that expanding them is more intentional, or we could have a mechanism for reverting an expansion so that you can submit a command without the expansion occurring?

im not sure what the best fix would be. of course we can simply remove the string veto for bashisms for now since that will revert it back to the behavior from before, but it will allow things like #13577 to occur.

@fdncred

fdncred commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

echo !! should return the entire last command... I think.

Another thing I thought of is expanding abbreviations to support things like !!, !$, !n. For now, I'd just like to remove any breaking changes.

@casedami

Copy link
Copy Markdown
Contributor Author

ok this change will restore that behavior

@fdncred
fdncred marked this pull request as ready for review June 11, 2026 18:28
@fdncred

fdncred commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

ok, let's land this to get the latest reedline commit and these changes in. We still need to figure out how to fix the problem whether it's expanding abbreviations and eliminating so-called bashisms or some other way.

Thanks for all your help @casedami !!

@fdncred
fdncred merged commit 5e6e1a6 into nushell:main Jun 11, 2026
19 checks passed
@github-actions github-actions Bot added this to the v0.114.0 milestone Jun 11, 2026
@fdncred fdncred added the notes:hide Noted only in "Full Changelog" section label Jun 22, 2026
@cptpiepmatz cptpiepmatz added notes:mention Noted in "Hall of Fame" section notes:ready Indicates Ready for Release notes and removed notes:hide Noted only in "Full Changelog" section labels Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:mention Noted in "Hall of Fame" section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bashisms don't work when typing string arguments

3 participants