Easier roster manipulation
In the roster tab, a lot of commands are needed (e.g.: adding someone to
the roster, edit a contact, accept a contact, refuse a contact, change
status (in the room too or just for people in roster), etc)
And these commands would take a lot of parameters (for example when
adding someone to the roster: his jid, his display-name (optional), some
groups, an invite message…).
So, commands in the roster would be of one key. See this example:
By default, the input is replaced by a read-only line describing the
meaning of some keys (defined, for example, by what roster item is
selected)
"a→ change status"
The user types "a"
and the input appears, with a read-only text just before it, describing
what he now needs to provide:
In this case, only 4 choice are possible (for the presence type), so the
input should display the 4 presence (available, away, busy etc) and the
user could choose between them with the arrow keys or a number.
The user presses Enter, and get prompted with the next "argument":
"Enter your personal message: "
Here goes the normal input, the user enters what he wants, and presses
enter.
This whole process would be equivalent to "/show available I'm available"
The read-only line could also say "b→ Accept the user" only when the
selected roster item is a contact with status of "none" or "to" and a
Ask at "subscribe"
Typing "b" would prompt the user for a group, a display-name, etc (with
the input), and validating all this would accept the contact.
Also, Escape and/or Ctrl+G would cancel any command currently started.
The command could also be accessible by typing them in the input, (like
currently)
Pressing "/" would show the input to let the user enter any command (can
be faster, but also less intuitive for the users who don't know poezio).
Any remark on this idea?