Validate the hint spawn fix as well as add feature tests for previously
untested hinting behaviors (fill, run, --rapid).
There is still no test for the 'userscript' target as running a
userscript from hint mode during a test does not get the same
redirection as the 'I execute the userscript ...' statement, That is,
it looks in /usr/local/share/qutebrowser/userscripts rather than
tests/integration/data/userscripts.
This supports things like :hint all spawn -v echo as '-v echo' will be
passed as a single unit to spawn rather than -v being interpreted as a
flag for :hint.
Resolves#797.
Note that, while `:hint --rapid all spawn -v` echo works,
`:hint all --rapid spawn -v echo` does not (this did not work before
either).
Instead of creating a new guiprocess manually, just pass the args along
to the spawn command so it can accept args like -v.
Addresses part of #797 by allowing `hint -- all spawn -v echo`.
`hint all spawn -v echo` is still not supported.
When we are in rapid mode with only one link, after following the hint, fire()
called filter_hints(None) to display all hints again. Then filter_hints tried
to follow that link, fire() tried to show all again, etc., leading to a
RecursionError.
Fixes#1513.
A test will be added via #1510.
The check `key.startswith('<') and key.endswith('>') is repeated many
times in code to check for a special key. Replace all these with a call
to the same function.
Currently, the keyhint window is shown even if the keystring matches no
possible bindings. This causes an empty keyhint window to hang around
after entering hinting mode.
Instead, the window is now hidden if no bindings match the current
keystring.
Resolves#1507.
When showing the currently bound key in the misc column for command
completion, if the command has multiple bindings, show special bindings
(e.g. <ctrl-a>) after non-special bindings.
- Add a space after the comman for multiple binding suggestions.
- Use defaultdict(list) instead of defaultdict(lambda: [])
- Move the pylint comment back to the top of the class
Since we're not using those functions as argparse callbacks anymore, we
can write a normal function instead of factories, which simplifies
things a lot.