Skip to content

Commit 2b7bb62

Browse files
author
Emily Grace Seville
authored
sd: refresh page (tldr-pages#9595)
* Explicitly specify output stream: - experimental format * Fix file placeholder * Quote command substitution * Change the last example description
1 parent 4f248c7 commit 2b7bb62

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pages/common/sd.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33
> Intuitive find & replace CLI.
44
> More information: <https://github.com/chmln/sd>.
55
6-
- Trim some whitespace using a regular expression:
6+
- Trim some whitespace using a regular expression (output stream: `stdout`):
77

88
`{{echo 'lorem ipsum 23 '}} | sd '\s+$' ''`
99

10-
- Replace words using capture groups:
10+
- Replace words using capture groups (output stream: `stdout`):
1111

1212
`{{echo 'cargo +nightly watch'}} | sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3'`
1313

14-
- Find and replace in a file printing the result to `stdout`:
14+
- Find and replace in a specific file (output stream: `stdout`):
1515

16-
`sd -p {{'window.fetch'}} {{'fetch'}} {{http.js}}`
16+
`sd -p {{'window.fetch'}} {{'fetch'}} {{path/to/file.js}}`
1717

18-
- Find and replace across a project changing each file in place:
18+
- Find and replace in all files in the current project (output stream: `stdout`):
1919

20-
`sd {{'from "react"'}} {{'from "preact"'}} $(find . -type f)`
20+
`sd {{'from "react"'}} {{'from "preact"'}} "$(find . -type f)"`

0 commit comments

Comments
 (0)