ani-cli icon indicating copy to clipboard operation
ani-cli copied to clipboard

Interactive Retry Prompt on Invalid Anime Search

Open AbhishekMauryaGEEK opened this issue 6 months ago • 3 comments

Feature Request: Interactive Retry Prompt on Invalid Anime Search

Current Behavior

When a user enters an incorrect or partial anime title, ani-cli exits immediately with:

No results found!

This requires the user to restart ani-cli manually to retry the search.

Example:

$ ani-cli
Search anime: onepiec
No results found!

Proposed Improvement

Instead of exiting immediately, allow users to retry the search interactively when no results are found.

Example flow:

$ ani-cli
Search anime: onepiec

No results found for "onepiec".
Tip: Try alternate spellings or press Ctrl+C to exit.

Search anime: one piece

Suggested Scope (v1)

Limit this behavior to the initial anime search query only.

This keeps the feature simple and avoids affecting:

  • episode selection flows
  • continue-watching logic
  • other interactive menus

Important Considerations

Non-interactive Usage

The retry prompt should only activate when stdin is interactive (TTY).

For scripted/piped usage, current behavior should remain unchanged to avoid breaking automation.

Example:

[ -t 0 ]

Exit Path

Users should still be able to exit easily via:

  • Ctrl+C
  • optional retry limit (if preferred by maintainers)

UI Consistency

If possible, behavior should remain consistent across:

  • plain terminal mode
  • fzf
  • rofi

Why This Helps

  • Improves UX for typos and romanization differences
  • Reduces restart friction
  • Matches common CLI interaction patterns
  • Makes searching feel smoother and more forgiving

Notes

This is intended as a UX enhancement, not a bug/crash fix. The command currently exits cleanly — this proposal only aims to improve the retry experience.

AbhishekMauryaGEEK avatar May 14 '26 18:05 AbhishekMauryaGEEK

That would actually be nice

Nick-Lemy avatar May 15 '26 09:05 Nick-Lemy

Is Anyone still working on it ?

Ashish2343 avatar May 21 '26 04:05 Ashish2343

@Ashish2343 This request is about reducing UX friction for interactive users — a retry prompt avoids full restarts on typos without touching automation. For a PR, the change should stay limited to interactive TTY sessions on the initial search query, preserving current behavior for non‑interactive, rofi/dmenu, and CLI arg usage with clean exits via Ctrl+C / Ctrl+D

AbhishekMauryaGEEK avatar May 22 '26 05:05 AbhishekMauryaGEEK