micro-editor / micro-editor/micro

[Feature request] Provide search pattern as command line parameter

Open
#2,103 15 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

Some editors allow to specify search pattern as a command line parameter. When editor opens the file it positions cursor at the found pattern and allows to search for next occurrences.

It would be great if micro would support command line arguments such as --find <regexp> and --find-literal <string>

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating micro's command-line argument handling and the code that opens a file and performs an initial search. Check how existing arguments are parsed and how literal versus regular-expression searches are represented. Done means the new --find and --find-literal arguments accept their values, position the cursor at the first match when opening a file, and allow subsequent occurrences to be searched.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.