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

Port before_v0.60/coloring folder (issue #221) #836

Merged
merged 18 commits into from
May 13, 2024

Conversation

39555
Copy link
Contributor

@39555 39555 commented May 12, 2024

This PR is part of porting all old scripts #221 and ports coloring folder

@fdncred
Copy link
Collaborator

fdncred commented May 13, 2024

looks like there are some conflicts here

39555 added 18 commits May 13, 2024 17:20
This script is already ported to `modules/coloring/24bit-1.nu`
This script is already ported to `modules/coloring/256_color_testpattern.nu`
- `str lpad` -> `fill -a l`
- `if {}{}` -> `if {} else {}`
- `str collect` -> `str join`
- explicit `print`
- `str collect` -> `str join`
- remove the commented old script for 0.31
- pipeline for -> `each`
- escape `\`
- remove the version comment
- `str collect` -> `str join`
- remove `autoview`
- math eval % to `mod`
- `str collect` -> `str join`
- `if {} {}` -> `if {} else {}`
- merge `nu_index_fg.nu` and `nu_index_fg2.nu` this is the same script
- math eval % to `mod`
- `str lpad -l` to `fill -a l -w`
- `str collect` -> `str join`
- `if {} {}` -> `if {} else {}`
- uncomment one-liner, make a function
- `str collect` -> `str join`
- `str lpad -l` -> `fill -a l -w`
- `if {...} {<empty>}` -> `if {}`
- explicit print
- `str collect` -> `str join`
- explicit print
- `str lpad -l` -> `fill -a l -w`
- `str collect` -> `str join`
- remove autoview
- `echo 40..47 100..107 49` -> `[40..47 100..107 49] | each { flatten } | flatten`
I've pasted them inside nu scripts
@39555 39555 force-pushed the port-before_v0.60/coloring branch from ef22f0f to 917abad Compare May 13, 2024 13:21
@39555
Copy link
Contributor Author

39555 commented May 13, 2024

I updated my fork and rebased my branch. Conflicts were due deletion *sh *.ps1 *.py files in the coloring module

@fdncred
Copy link
Collaborator

fdncred commented May 13, 2024

Oh, I had those files there for a reason when I wrote them. It's good to see what the bash/pwsh/python equivalent is when porting a script. Maybe we should add them back.

@39555
Copy link
Contributor Author

39555 commented May 13, 2024

Oh, I had those files there for a reason when I wrote them. It's good to see what the bash/pwsh/python equivalent is when porting a script. Maybe we should add them back.

I put them in comments in nu files. Some nu scripts has already contain bash equivalents in comments so I decided it is convenient. If they should be separated files, I can revert it and just move to new location

@fdncred
Copy link
Collaborator

fdncred commented May 13, 2024

oh, I'm fine with comments. Thanks!

@fdncred fdncred merged commit bb814f1 into nushell:main May 13, 2024
1 check failed
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.

None yet

2 participants