Skip to content

Add ghost hinting / completion feature #1545

@ryanmerolle

Description

@ryanmerolle

Summary

Add support for "ghost hints" - a visual completion suggestion that appears as greyed-out or faded text after the user's current input, showing the most likely next completion without requiring the user to press Tab or complete it.

Use Case

This feature improves user experience by providing predictive guidance. As users type commands or arguments, they can see a hint for what cmd2 predicts they might want to complete next, similar to features in:

  • Fish shell's autosuggestions
  • IDE autocomplete ghosts
  • Command-line tools like fzf

Expected Behavior

  • When a user types a partial command or argument, cmd2 shows a faded/greyed-out suggestion of the most likely completion
  • The hint appears without interfering with what the user has typed
  • Users can press a key (Tab) to accept the suggestion
  • If the suggestion is incorrect, the user can simply continue typing and the hint updates
  • The feature should be optional and configurable (can be enabled/disabled)

Implementation Considerations

  • Integrate with cmd2's existing completion system
  • Make styling/appearance configurable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions