Skip to content

fix(completion): a regression on flags without a long name#16967

Merged
fdncred merged 1 commit into
nushell:mainfrom
blindFS:fix_get_long_flag
Nov 3, 2025
Merged

fix(completion): a regression on flags without a long name#16967
fdncred merged 1 commit into
nushell:mainfrom
blindFS:fix_get_long_flag

Conversation

@blindFS
Copy link
Copy Markdown
Contributor

@blindFS blindFS commented Nov 3, 2025

Fixes a regression caused by #15613

Originally reported by @Juhan280 on discord

Release notes summary - What our users need to know

Fixed a regression of custom-completion for short flags without a long name.

Tasks after submitting

None

Comment on lines +311 to +320
#[case::short_flags(
"def foo [-A, -B: string@[cat dog] ] {}",
"foo -B ", None,
vec!["cat".into(), "dog".into()]
)]
#[case::flag_name_vs_value(
"def foo [-A, -B: string@[cat dog] ] {}",
"foo -B cat", Some("foo -B".len()),
vec!["-B".into()]
)]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only these 2 are new.

@fdncred fdncred merged commit ff7693e into nushell:main Nov 3, 2025
16 checks passed
@fdncred
Copy link
Copy Markdown
Contributor

fdncred commented Nov 3, 2025

Thanks

@github-actions github-actions Bot added this to the v0.109.0 milestone Nov 3, 2025
@blindFS blindFS deleted the fix_get_long_flag branch November 4, 2025 00:41
@WindSoilder WindSoilder added notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes labels Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

notes:fixes Noted in "Bug fixes" section notes:ready Indicates Ready for Release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants