diff options
author | Gregory <chmln@users.noreply.github.com> | 2020-07-20 16:59:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-20 16:59:23 -0400 |
commit | 03dcd40591b5e3c82948b98c7481c26c27352911 (patch) | |
tree | 8b326e484ff872193908ecd89077133c6fd7cb01 | |
parent | 987373bdb11b1ddbbe3287b8880e4595c50c18f9 (diff) | |
parent | e140b82b3d6173ba8b0a98d63ef9a90de197cd62 (diff) |
Merge pull request #91 from dym-sh/patch-1
edge-case info for strings starting with '--'
-rw-r--r-- | README.md | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -210,3 +210,15 @@ for file in $(fd --type file); do sd 'from "react"' 'from "preact"' "$file"; done ``` + +### Edge cases +replace/-with string needs extra `--` before it, if starts with double-minus +(this is a limitation of the bash itself) + +```bash +echo "test/test" | sd '/' -- '--inteneded--' +test--inteneded--test + +echo "start/--/end" | sd --string-mode -- '--' 'middle' +start/middle/end +``` |