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

str_replace: add link to rust doc #1584

Closed
wants to merge 1 commit into from
Closed

Conversation

quadristan
Copy link

@quadristan quadristan commented Oct 9, 2024

Trying to escape a capture group name, I had to discover and read rust doc.
Finding it should be easy for people who wants to know the specification of the regex mode.

Adding a link to it will bring knowledge to users.

👍 Knowledge!
🤔 Should we copy rust doc here in order to not be coupled with it? I have the feeling Nushell<>rust coupling is intentional, this is why I am opening the PR this way

Trying to escape a capture group names, I had to discover rust doc.

Adding a link to it will bring knowledge

:+1: Knowledge!
:thinking: Should we copy rust doc here in order to not be coupled with it? I have the feeling nushell<>rust coupling is intentional, this is why I am opening the PR this way
@fdncred
Copy link
Collaborator

fdncred commented Oct 9, 2024

unfortunately, command docs cannot be updated this way because they will get overwritten at the next release. For help or examples on commands to be updated, one has to change the rust code. Also, str replace uses fancy-regex. Is that syntax any different? I believe fancy falls back to "regular" regex when the fancy features aren't being used though.

@fdncred fdncred closed this Oct 9, 2024
fdncred pushed a commit to nushell/nushell that referenced this pull request Oct 9, 2024
# Description

This is a follow-up of
nushell/nushell.github.io#1584

The goal is to provide the user understanding of how to escape strings

# User-Facing Changes
Nothing except documentation

# Tests + Formatting
 
 I don't know why but these two tests are failing on my system:

- `test_std_util path_add`
- `commands::umkdir::mkdir_umask_permission`

Since I hardly believe it is linked to my changes, I will let your CI
check it. Meanwhile, I will check my system, highly likely that it is
something something related to me recently switching shells, hacking my
way through prompts environments, etc.


# After Submitting

Will check how to re-generate the [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged
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