1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-06-05 13:05:59 +02:00

sd: Remove option -i in favour of option -p (#4209)

Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
Danny Mösch 2020-07-21 22:50:14 +02:00 committed by GitHub
parent 8effb5ba77
commit ab00dce9de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
# sd
> `sd` is an intuitive find & replace CLI.
> Intuitive find & replace CLI.
- Trim some whitespace using regex:
@ -10,10 +10,10 @@
`{{echo 'cargo +nightly watch'}} | sd '(\w+)\s+\+(\w+)\s+(\w+)' 'cmd: $1, channel: $2, subcmd: $3'`
- Find and replace in a file:
- Find and replace in a file printing the result to stdout:
`sd -i {{'window.fetch'}} {{'fetch'}} {{http.js}}`
`sd -p {{'window.fetch'}} {{'fetch'}} {{http.js}}`
- Find and replace across a project:
- Find and replace across a project changing each file in place:
`sd -i {{'from "react"'}} {{'from "preact"'}} $(find . -type f)`
`sd {{'from "react"'}} {{'from "preact"'}} $(find . -type f)`