[BusyBox] vi substitution is broken

Rob Landley rob at landley.net
Tue Mar 16 16:23:20 UTC 2004


On Tuesday 16 March 2004 10:00, Tony J. White wrote:
> On Sun, Mar 14, 2004 at 01:13:14PM +1100, Paul Whittaker wrote:
> > Package: busybox
> > Version: 1.00pre8
> >
> > Attempts to do a global search and replace in the vi applet (with all
> > suboptions turned on, including CONFIG_FEATURE_VI_COLON and
> > CONFIG_FEATURE_VI_SEARCH) do nothing.  No output, just no action
> > performed.
> >
> > To reproduce, edit an arbitrary text file and try ":1,$s/^/foo/".
>
> Actually, the search and replace does work, it's just that you can't use
> regular expression matching (.e.g. ^).
>
> Example: ":1,$s/blah/foo/"  would work to replace all occurances of "blah"
> with "foo".
>
> There is some support for regex in vi.c, but there's currently no way to
> turn it on without editing vi.c.  When I do turn it on by defining
> REGEX_SEARCH, it doesn't compile for me.

I've pondered taking a whack at factoring out common elements of the vi and 
sed code and combining them somehow, but I'm not familiar enough with the 
busybox vi implementation and it's way down on my to-do list.

> -Tony

Rob




More information about the busybox mailing list