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

docs(sed): document sed syntax, quoting, and escaping slash #170

Merged
merged 1 commit into from
Dec 9, 2019

Conversation

nfischer
Copy link
Member

@nfischer nfischer commented Dec 9, 2019

No change to logic, only docs.

This documents the special sed syntax (ex. shx sed s/foo/bar/g filename.txt). With that, this mentions that / is a special
character, so the user must escape that if it's present in either the
regex or replacement string.

This also documents how Windows handles single quotes differently, so
it's desirable to avoid single quotes in package.json scripts. This part
isn't specific to sed, but since it's popular to quote sed expressions,
I'm adding this to the docs at the same time.

Fixes #165
Fixes #169

No change to logic, only docs.

This documents the special sed syntax (ex. `shx sed s/foo/bar/g
filename.txt`). With that, this mentions that `/` is a special
character, so the user must escape that if it's present in either the
regex or replacement string.

This also documents how Windows handles single quotes differently, so
it's desirable to avoid single quotes in package.json scripts. This part
isn't specific to sed, but since it's popular to quote sed expressions,
I'm adding this to the docs at the same time.

Fixes #165
Fixes #169
@nfischer nfischer added the docs label Dec 9, 2019
@codecov-io
Copy link

codecov-io commented Dec 9, 2019

Codecov Report

Merging #170 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #170   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         114    114           
=====================================
  Hits          114    114

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e5c1513...bbcc217. Read the comment docs.

@nfischer nfischer merged commit 7e7bf7f into master Dec 9, 2019
@nfischer nfischer deleted the doc-sed branch December 9, 2019 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sed: no files given sed can't replace files in a different directory
2 participants