General TC > General TC Talk
busybox vi ":s" command
jazzbiker:
Hi, Core people!
If anybody is interested in the patch for :s command in busybox-1.29.3 vi, I can post it. Enables full power extended regexps with backreferences in the search pattern and subpatterns substitution in replace field.
Regards!
Juanito:
Is this the same as http://tinycorelinux.net/10.x/x86_64/release/src/busybox/busybox-1.29.3_vi_search.patch
jazzbiker:
Hi, Juanito!
No, the patch You mention is trivial workaround for colon commands ranges. But the :s command currently is almost unfunctional, even worse than if compiled without VI_REGEX_SEARCH_ENABLED, because the use "(){}[]|" symbols in the "find" pattern causes wrong string lengths and broken output. Probably, I'm alone on this planet, using busybox vi.
andyj:
No, you're not alone, and I've noticed that the 's' command on busybox has been broken for as long as I've ever tried to use it. ESXi also uses busybox and it's broken there too so it's busybox, not just TC. That's why I either use sed or vim (which I maintain the extensions for so that I can have a working vi editor). Is this patch from upstream busybox, or somewhere else?
jazzbiker:
Hi, andyj!
Ok, there are at least two of us ;-) No, i didn't sent it to busybox. Previous my fix for backward search was ignored by busybox team, and I made the conclusion, that they are satisfied with vi functionality and don't want to waste time on unimportant issues. Probably busybox is mainly compiled without those strange regular expressions and everybody is happy.
So the patch I've made is used by myself only, and not tested by anybody else. Substantially it isn't the patch, because there were nothing to be patched concerning regexps. Two simple functions added, a couple of local variables added in the colon() function, xmalloc() and free() calls used, so memory leaks are possible. Globals untouched. Want to participate in testing?
Navigation
[0] Message Index
[#] Next page
Go to full version