ansible / ansible-navigator

A text-based user interface (TUI) for Ansible.
https://ansible.readthedocs.io/projects/navigator/
Apache License 2.0
356 stars 96 forks source link

TUI mode to use arrows for moving cursor to choose tasks #1564

Open Andersson007 opened 1 year ago

Andersson007 commented 1 year ago

FYI i asked for the answer in DevTools matrix channel first. As i got no response, I guess there's no solution to the issue, so opening it here.

ISSUE TYPE
SUMMARY

I didn't find any way in ansible-navigator's TUI not to type numbers of tasks but use arrows or something else to choose a task using a kinda cursor.

So far it's really inconvenient unless you're a num keys guru. Especially on keyboards with no separate num section in the right..

An example of similar python-based tool is pg_activity which allows to use arrows for cursor moving and it's super cool:)

if it's not supported, it'd be nice to have the following to preserve backwards compatibility:

  1. You press a special button
  2. The cursor appears at the first item (currently with number 0)
  3. The arrows on keyboard can now be used to move the cursor
  4. You can press Enter to run the task the cursor at
priyamsahoo commented 11 months ago

A couple of tools that I have used which can be used as inspiration are: yarn upgrade-interactive and ncu --interactive. And the Python packages that can be used are click (preffered) and PyInquirer. We can also look into other tools that have these kinds of interaction capabilities from https://github.com/shadawck/awesome-cli-frameworks#python

shatakshiiii commented 11 months ago

Thanks for mentioning all these tools @priyamsahoo :)