micro-editor / micro-editor/micro

'Open' command auto-completion with TAB doesn't adhere to the usual Linux standard and is inconvenient to use

Open
#2,977 0 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

Description of the problem or steps to reproduce

I'm using micro for editing code in my project which has a few scripts, most of their names start with the same prefix but have different suffixes (a.k.a geoblocker-bash-install, geoblocker-bash-apply, geoblocker-bash-manage etc).
I frequently need to open one or the other script from inside micro. I press Ctrl-O to open a file, type in a couple first letters (as you normally do in Linux), press TAB and then I want the application to autocomplete the filename to the point where there are multiple further options.

So expected behavior: I type in "geo", press TAB and micro auto-completes to geoblocker-bash-. Next I can type in the next couple of letters, press TAB again and have it auto-complete the suffix. Which is the standard behavior in every Linux terminal I've seen (and in Nano as well).

Actual behavior: after typing in 'geo' and pressing TAB, micro auto-completes to the full name of the first file it finds that starts with this sequence. So in my example, it always auto-completes to 'geoblocker-bash-apply', Now to open a different script with this prefix, I have to either do a bunch of tabbing, or manually backspace the suffix (i.e. remove 'apply') and type in a few more letters then press TAB again.

Both options are inconvenient, and when you have to do that over and over again, it becomes a pretty big annoyance (although not world-ending).

Specifications

Commit hash: c2cebaa
OS: Debian
Terminal: xterm

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 reproducing the Ctrl-O file-opening workflow in micro on the reported Debian/xterm setup, then locate the open-command completion entry point and its TAB handling. Compare the current completion with the requested shared-prefix behavior; done means TAB stops at the longest common prefix and still allows selecting each matching filename.

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.