sd: Remove option -i in favour of option -p (#4209)
Co-authored-by: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
This commit is contained in:
@@ -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)`
|
||||
|
Reference in New Issue
Block a user