Skip to content

Port root before_v0.60/*.nu scripts (issue #221) - #837

Merged
fdncred merged 7 commits into
nushell:mainfrom
39555:port-before_v0.60/before_v0.60
May 13, 2024
Merged

fdncred merged 7 commits into
nushell:mainfrom
39555:port-before_v0.60/before_v0.60

Conversation

@39555

@39555 39555 commented May 12, 2024 •

Copy link
Copy Markdown

This PR is part of porting all old scripts #221 and ports all root before_v0.60/*.nu scripts to modules/*.nu

Igor added 6 commits May 12, 2024 23:28
`into bits` `into int` already in the core
This script is already ported to `sourced/fehbg.nu`
just `update {|row| ...}`
- `if {} {}` -> `if {} else {}`
- `str find-replace` -> `str replace`
Comment thread modules/make_readme_table.nu Outdated
# Let's fix the file now
let nu_table = ($nu_table | update File { |it|
let file_path = ($it.File | into string | str find-replace '\\' '/')
let file_path = ($it.File | into string | str replace '\\' '/')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm thinking this should probably be str replace '\\' '/' --all, otherwise it just replaces the first one I think.

- add `--all` to replace all occcurencies
- `\\` -> '\'. No need to escape backslash in single qoutes
@fdncred
fdncred merged commit a0e6973 into nushell:main May 13, 2024
@fdncred

fdncred commented May 13, 2024

Copy link
Copy Markdown
Contributor

Thanks

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.

2 participants