Skip to content

Interactive typing UX for Ash #21

Closed
4 of 4 issues completed
Closed

Description

@nebuff

Goal

Make Ash feel like a serious daily shell the moment someone starts typing, with a small set of interactive features rather than a giant plugin index or another prompt-theme swamp

1. Inline autosuggestions from history, as you type

Show the rest of a likely completion inline in a subdued color. Accept with
right-arrow / end / a chord

2. Inline syntax coloring of the command line as you type

Minimum bar for the current token under the cursor:

  • command
  • argv
  • redirect (>, >>, <)
  • pipeline (|)
  • possibly quoted segments

3. A real accept path, not a one-shot overwrite

Autosuggestions are annoying when you cannot edit them. The accept semantics
need to include at least:

  • accept-and-hold
  • accept-and-show-next
  • forward-delete / editing through the suggestion

4. History search that feels good

A Ctrl-R / arrow-up style reverse search is the minimum. A searchable,
navigable history UI is the thing that makes people stay. Even a small step up
from "cycle arrows through history" is worth shipping early

5. Typing-time completion preview where it is cheap

If a package can supply completions cheaply, preview the current candidate as
you type. Do not block the line on expensive work.

Where to start

The REPL line editing is the natural place to start. Treat inline suggestions
and inline coloring as editing-layer features

A reasonable first scope:

  1. one accept path
  2. one visible color scheme for inline suggestions
  3. one history search mode
  4. inline coloring for the current token under the cursor

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationenhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions