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

Document regex capabilities #4268

Closed
kubouch opened this issue Jan 19, 2022 · 12 comments
Closed

Document regex capabilities #4268

kubouch opened this issue Jan 19, 2022 · 12 comments
Labels
documentation issues relating to documentation good first issue Good for newcomers

Comments

@kubouch
Copy link
Contributor

kubouch commented Jan 19, 2022

Related problem

Asked here
#4266

Describe the solution you'd like

We should state what kind of regex we support.

This might be as simple as stating we use the regex crate. I haven't looked at all the commands that use regex, so I'm not sure.

Describe alternatives you've considered

No response

Additional context and details

No response

@kubouch kubouch added documentation issues relating to documentation good first issue Good for newcomers labels Jan 19, 2022
@fdncred
Copy link
Collaborator

fdncred commented Jan 19, 2022

agreed. i've chased this question myself a couple times. having it documented would help because it is a very particular flavor of regex.

@sakimyto
Copy link

sakimyto commented Feb 1, 2022

Hi, I was just trying to read the whole project before I joined the development.
Let me see if I understood it right.
For creating documentation on regex, check where regex is used in the entire nushell/crates/ directory, is that it?

@kubouch
Copy link
Contributor Author

kubouch commented Feb 1, 2022

@sakimyto Yeah, that sounds right.

We're about to merge the big update relatively soon, but I don't think it will impact this issue since AFAIK we did not change anything regarding regex.

@sakimyto
Copy link

sakimyto commented Feb 2, 2022

@kubouch
OK. Let's find out where it is used.

@sakimyto
Copy link

sakimyto commented Feb 5, 2022

First, I checked each of their Cargo.toml. But the only thing I could find related to regular expressions was rust_lang/regex. However, I found a possibility that it uses other crates in dependencies of dependencies. For exmaple, nu_plugin_textview -> sharkdp/bat -> rust-onig/rust-onig.
We should also look into crates for dependents, right?

@fdncred
Copy link
Collaborator

fdncred commented Feb 5, 2022

textview will be removed in the next version of nushell but regex is used in a few place like in the str find-replace command. so, I'd just focus on the https://github.com/rust-lang/regex

@sakimyto
Copy link

sakimyto commented Feb 6, 2022

Then, I'll add that we basically use rust-lang/regex to the docs and contributor book?

@kubouch
Copy link
Contributor Author

kubouch commented Feb 6, 2022

@sakimyto Yeah, that sounds good!

@sakimyto
Copy link

sakimyto commented Feb 7, 2022

Hmm, where would be a good place to write this?
I'm thinking of adding to 2 parts.

  1. Add to the end of https://github.com/nushell/nushell.github.io/blob/master/contributor-book/plugins.md#creating-a-plugin-in-rust
  2. Add to the end of https://github.com/nushell/nushell/blob/main/docs/commands/README.md#anything-else

@fdncred
Copy link
Collaborator

fdncred commented Feb 7, 2022

Maybe make a new section in the book called regex?

@sakimyto
Copy link

sakimyto commented Feb 7, 2022

@fdncred I'm grateful for your support. Created PR.
nushell/nushell.github.io#218

@kubouch
Copy link
Contributor Author

kubouch commented Feb 16, 2022

Fixed with @sakimyto 's PR

@kubouch kubouch closed this as completed Feb 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation issues relating to documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants