Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature+: Zero padding in numeric ranges #6

Merged
merged 1 commit into from
Feb 16, 2025

Conversation

augustofg
Copy link
Contributor

This copies the bash range expansion behavior:

$ echo {01..10} 
01 02 03 04 05 06 07 08 09 10
$ echo {1..010} 
001 002 003 004 005 006 007 008 009 010

This copies the bash range expansion behavior.
@fdncred
Copy link

fdncred commented Jan 15, 2025

@atahabaki Is it possible to move forward with this? We have some people asking for it in nushell. Thanks for your support!

@atahabaki
Copy link
Owner

atahabaki commented Feb 16, 2025

That's a cool idea!

It's been a while since I last had time to work on my GitHub projects. Otherwise, I had grand plans to make bracoxide surpass Bash’s brace expansion—but alas, time has not been on my side.

Apologies for the delayed response, and thank you for your PR—I truly appreciate it! Thanks for your contributions @augustofg!

This feature gave me even more superior idea. How about this? Gonna work on that, planned to v1.0.6

{1..3, 0:2} // [ 001, 002, 003]
{1..3, _:2} // [__1, __2, __3]
{23..26, *:3} // [***23, ***24, ***25, ***26]

@atahabaki atahabaki merged commit 8255507 into atahabaki:dev Feb 16, 2025
@atahabaki atahabaki changed the title Add support for zero padding in numeric ranges Feature+: Zero padding in numeric ranges Feb 16, 2025
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