You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -10,7 +10,7 @@ backreference to matching groups in the replacement.
10
10
Defaults to global multiline case-insensitive search.
11
11
Needs node v6+.
12
12
13
-
Files can be given in[glob notation](https://www.tcl.tk/man/tcl8.5/tutorial/Tcl16a.html), for example the glob `docs/*.md` represents each markdown file in the `docs/` dir.
13
+
Files can be given as[glob notation](https://www.tcl.tk/man/tcl8.5/tutorial/Tcl16a.html), for example the glob `docs/*.md` represents each markdown file in the `docs/` dir.
14
14
15
15
### Install
16
16
```bash
@@ -22,6 +22,10 @@ Files can be given in [glob notation](https://www.tcl.tk/man/tcl8.5/tutorial/Tcl
Hard on your fingers to write on your keyboard? We got you covered with `rr` as alias for `rexreplace`
26
+
27
+
28
+
25
29
### Examples
26
30
```bash
27
31
> rexreplace Foo xxx myfile.md
@@ -32,19 +36,18 @@ Files can be given in [glob notation](https://www.tcl.tk/man/tcl8.5/tutorial/Tcl
32
36
33
37
> rexreplace '^#''##'*.md
34
38
# All markdown files in this dir got all headlines moved one level deeper
35
-
39
+
36
40
> rexreplace '(f?(o))o(.*)''$3$1$2' myfile.md
37
41
# 'foobar' in myfile.md will become 'barfoo'
38
42
39
-
#Some commandline tools (bash/zsh/...) is a bit funny with the `$` sign. use the '-€' flag to have `€` alias a `$`
40
-
> rexreplace '(f?(o))o(.*)''€3€1€2' myfile.md -€
43
+
#Per default '€' is treated as an alias for '$' because some commandline tools have a special relationship with with the `$` char. Your can escape your way out of this old love story but it often popup in unexpected ways.
44
+
> rexreplace '(f?(o))o(.*)''€3€1€2' myfile.md
41
45
# 'foobar' in myfile.md will become 'barfoo'
42
46
43
47
```
44
48
45
49
46
50
### Options
47
-
48
51
```
49
52
-v, --version Echo rexreplace version [boolean]
50
53
-I, --void-ignore-case Void case insensitive search pattern. [boolean]
@@ -61,9 +64,8 @@ Files can be given in [glob notation](https://www.tcl.tk/man/tcl8.5/tutorial/Tcl
61
64
-Q, --quiet-total Never display erros or info [boolean]
62
65
-H, --halt Halt on first error [boolean] [default: false]
63
66
-d, --debug Print debug info [boolean]
64
-
-€, --eurodollar Replace all '€' with '$' in pattern and replace
65
-
string. Usefull when your commandline (bash/zsh/...)
66
-
seeks to do interesting things with '$' [boolean]
67
+
-€, --void-euro Void having '€' as alias for '$' in pattern and
68
+
replacement [boolean]
67
69
-h, --help Show help [boolean]
68
70
```
69
71
@@ -75,6 +77,10 @@ All tests are defined in [test.sh](https://github.com/mathiasrw/rexreplace/blob/
75
77
```
76
78
77
79
### Future ideas
80
+
- Support node 0.12+
81
+
- Test-run a with info outputted about what will happen (sets -v and does not change anything)
82
+
- Let search and replace be withing the names of the files (ask for overwrite. -Y = no questions)
83
+
- Let search and replace be within the path of the files (ask for overwrite. -Y = no questions)
78
84
- Piped data while no globs = this is content to be searched (will always output) (when no -rp flags)
79
85
- Piped data while having 1 globs = output is to be stored in this file (when no -rpo flags)
80
86
- Piped data while having 2+ globs = error (when no -rpg flags)
0 commit comments