Opened 5 years ago

Closed 19 months ago

#11488 closed enhancement (invalid)

TextSearch: implement replacing

Reported by: Giova84 Owned by: nobody
Priority: normal Milestone: Unscheduled
Component: Applications/TextSearch Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Well, anyone which knows shell scripting, also knows how sed is so useful. The proposal of this enhancement is to add "sed" improvements to TextSearch application: in this way we couldn't only search for text inside files, but we could also replace text, add lines and every action that sed is able to do.

Change History (10)

comment:1 Changed 5 years ago by stippi

But if someone knows sed, wouldn't they just use the command line to achieve what they need?

comment:2 Changed 5 years ago by Giova84

Is the same for grep, which is currently used in TextSearch. combine also sed, could be useful for those which doesn't know sed :) And would make TextSearch more powerful.

comment:3 Changed 5 years ago by Giova84

I understand the point of view of dev/power user, but Haiku is stated to be a Desktop-oriented OS, so any user should be able to do any things, also if they doesn't know what a shell script is :-)

comment:4 Changed 5 years ago by stippi

Well, I agree that providing a replacement feature that also somehow offers wildcards is very useful. I thought you specifically meant to allow sed-syntax in TextSearch.

comment:5 Changed 5 years ago by anevilyak

Personally, I fail to see the point of this. TextSearch is, as its name implies, a simple text searching tool. If you actually need to be making edits and so forth, then at that stage I'd just say open the matching files with an editor and go wild.

comment:6 in reply to:  5 Changed 5 years ago by Giova84

Replying to anevilyak:

If you actually need to be making edits and so forth, then at that stage I'd just say open the matching files with an editor and go wild.

But what if, if someone needs to replace/add text to hundred of files? Is merely impractical. Here the suggestion of this enhancement. Just by using one application you can automatically - also - replace/insert text on hundreds of files.

comment:7 Changed 5 years ago by humdinger

As I see it, TextSearch is only a stopgap until Tracker's "Find..." feature becomes more complete and offers searching files and their contents (with the help of a future index_daemon?).
Then TextSearch can be retired to a 3rd party package. Which can be extended to become a "TextTool" add-on as "3rd party opportunity". :)

So, while I'd appreciate to have such tool, I don't see it as in the scope of the core Haiku project.

comment:8 Changed 4 years ago by waddlesplash

Milestone: R1Unscheduled
Owner: changed from stippi to waddlesplash
Platform: x86All
Status: newassigned
Summary: TextSearch: improve it with "sed"TextSearch: implement replacing

comment:9 Changed 3 years ago by waddlesplash

Owner: changed from waddlesplash to nobody

deassigning various things from me

comment:10 Changed 19 months ago by phoudoin

Resolution: invalid
Status: assignedclosed

I agree that it sounds out of TextSearch current scope.

Which doesn't mean that some TextTool with a powerful grep-like search and sed-like replace features wont be a nice idea. A GSoC idea, maybe, even.

Meanwhile, closing as invalid request for TextSearch.

Note: See TracTickets for help on using tickets.