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
Copy file name to clipboardExpand all lines: README.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,22 +17,34 @@ Usage:
17
17
goreplace
18
18
19
19
Application Options:
20
-
-m, --mode=[replace|line|lineinfile|template] replacement mode - replace: replace match with term; line: replace line with term; lineinfile: replace line with
21
-
term or if not found append to term to file; template: parse content as golang template, search value have to
CaseInsensitivebool`short:"i" long:"case-insensitive" description:"ignore case of pattern to match upper and lowercase characters"`
55
55
Stdinbool` long:"stdin" description:"process stdin as input"`
56
-
Oncebool` long:"once" description:"replace search term only one in a file"`
57
-
OnceRemoveMatchbool` long:"once-remove-match" description:"replace search term only one in a file and also don't keep matching lines (for line and lineinfile mode)"`
56
+
Oncestring` long:"once" description:"replace search term only one in a file, keep duplicaes (keep, default) or remove them (unique)" optional:"true" optional-value:"keep" choice:"keep" choice:"unique"`
58
57
Regexbool` long:"regex" description:"treat pattern as regex"`
59
58
RegexBackrefbool` long:"regex-backrefs" description:"enable backreferences in replace term"`
60
59
RegexPosixbool` long:"regex-posix" description:"parse regex term as POSIX regex"`
0 commit comments