Commit Graph

569 Commits

Author SHA1 Message Date
Ryan Roden-Corrent
f237a87ad0 Completion for varargs.
When a command has positional varargs, keep offering the configured
completion for each successive argument.

Right now this only influences `config-cycle`.

Previously, `config-cycle <option> ` would offer a value completion for
only the first argument after the option. Now it will keep offering
value completion for each successive argument.

This will be useful for passing multiple tags to the new bookmark
commands that will be added for #882.
2018-03-25 21:59:30 -04:00
Florian Bruhin
e6aa6b8235 Add missing docs for {url:host} 2018-02-27 17:29:36 +01:00
Florian Bruhin
52b5492c6a Merge branch 'per-url' 2018-02-25 19:44:51 +01:00
Florian Bruhin
5c4277aac8 Add some default keybindings for toggling scripts
Those follow the following pattern:

1) "t" for 'toggle"
2) "s" for "scripts", upper-casing ("S") to make the toggle permanent
3) "h" for host, "H" for host with subdomains, "u" for the exact URL
2018-02-22 08:07:54 +01:00
Florian Bruhin
ecfd4a77a0 Merge remote-tracking branch 'origin/pr/3562' 2018-02-21 10:11:40 +01:00
George Edward Bulmer
b2e85a8b83 Simplify to lambda with default argument 2018-02-11 16:33:26 +00:00
George Edward Bulmer
7c0832daf2 Change lambda definition - avoid mutability error 2018-02-11 15:51:48 +00:00
Florian Bruhin
70868e1d99 Make pylint shut up 2018-02-10 23:18:43 +01:00
Florian Bruhin
a472351423 Fix typing.Union check on Python 3.5.2
Apparently 3.5.4 has __origin__ for typing.Union, but 3.5.2 has not. Let's hope
this now works everywhere...
2018-02-10 21:27:40 +01:00
Florian Bruhin
63766c1711 Fix typing.Union checks with Python 3.7 2018-02-10 17:22:21 +01:00
Florian Bruhin
c9bc72a539 Fix docstring 2018-02-10 16:54:45 +01:00
George Edward Bulmer
a6f09b1f73 Add the modified keys with a loop 2018-02-10 15:41:02 +00:00
Florian Bruhin
1ea1c1ac78 Merge remote-tracking branch 'origin/pr/3549' 2018-02-09 22:27:31 +01:00
Florian Bruhin
5d8b48a2ed Show where a command handler is defined 2018-02-09 16:32:59 +01:00
George Edward Bulmer
22c33ddfb8 Add special cases of double quotes: eg {{url}}
This allows a second level of indirection quite cheaply, but is a
band-aid fix.

This commit should be taken as temporary until command arguments are
reworked.
2018-02-05 21:45:49 +00:00
George Edward Bulmer
8b29ce93ec Add substitutions for the other 3 types 2018-02-05 21:40:12 +00:00
George Edward Bulmer
bfeac178e2 Make {suburl} expand to {url}
This is useful for the following case from IRC:
`:set aliases '{"twmpv": "spawn mpv {suburl}"}'

which now sets:
:twmpv -> spawn mpv {url}
2018-02-05 21:00:29 +00:00
Florian Bruhin
6f028e9ad0 Update copyright years 2018-02-05 12:19:50 +01:00
Florian Bruhin
c8de4675db Various spelling fixes 2018-02-04 21:30:59 +01:00
Marc Jauvin
132095c98c only open the tab for output once the job has finished running 2018-01-31 18:05:23 -05:00
Florian Bruhin
016fc0ebb1 Fix some inconsistent returns 2017-12-15 16:33:47 +01:00
Florian Bruhin
1a4a9b4392 Declare *args before keyword arguments
See https://pylint.readthedocs.io/en/latest/whatsnew/1.8.html
2017-12-15 16:33:47 +01:00
Florian Bruhin
b5dd647678 Upgrade pydocstyle/flake8-docstrings
See #3320
2017-11-26 20:30:32 +01:00
Ryan Farley
5ed8019115 update flake8 and flake8-deprecated
Updated requirements and adjusted the configuration in `.flake8`; other
files have been modified where the lack of per-file auto-ignore caused
problems, where putty's `# flake8: disable=` syntax could be replaced
with a simpler `noqa`, or where pylint directives already suppressed the
same error.
2017-11-26 00:16:14 -06:00
Florian Bruhin
f6cc6677dd Remove hiding of commands
This was often confusing for people - let's instead just hide commands which are
not available in normal mode.
2017-11-13 09:02:16 +01:00
Florian Bruhin
0b86b302a2 pylint: Turn off some more too-many-* stuff globally
Humans are just better at judging what's okay here than a machine.
2017-10-31 07:35:00 +01:00
siddhugolu
bc9d305354 modified as requested 2017-10-23 01:46:02 +05:30
siddhugolu
4862b2faf9 modified pylint pragmas 2017-10-22 23:52:35 +05:30
Florian Bruhin
12c9590524 Always use shortest match for completion.use_best_match 2017-10-17 15:01:37 +02:00
Florian Bruhin
2e64dda592 Clean up getting matching commands 2017-10-17 11:40:34 +02:00
Florian Bruhin
c233099bca Merge remote-tracking branch 'origin/pr/3063' 2017-10-17 11:34:35 +02:00
Luca Benci
71048a1b55 Add (and use) completion.use_best_match config 2017-10-09 11:12:37 +02:00
Luca Benci
9d0dfd5726 Always run best-matching command 2017-10-09 11:12:28 +02:00
Florian Bruhin
e63d11527d Get rid of CommandRunner.run_safely_init
All messages are queued nowadays.
2017-10-08 14:42:42 +02:00
Ryan Roden-Corrent
4a9e22163b Filter keyhints based on count prefix.
If a count prefix is given, only hint commands that can take a count.
2017-10-03 22:15:21 -04:00
Florian Bruhin
106edc953a Merge branch 'is-os' 2017-09-21 08:57:32 +02:00
Florian Bruhin
9d360f80cf Use __attrs_post_init__ to validate ArgInfo
This makes qutebrowser compatible with attrs < 17.1.0, such as attrs 16.3.0
coming with Debian Stretch.
2017-09-20 17:27:28 +02:00
Florian Bruhin
ef1c83862b Use utils.is_* for platform checks everywhere 2017-09-20 11:10:24 +02:00
Florian Bruhin
ba1cf06be6 Reintroduce handling for typing.Union.__union_params__
Looks like Python 3.5.2 doesn't have typing.Union.__args__.
2017-09-20 08:17:04 +02:00
Florian Bruhin
3a5241b642 Start using attrs
Closes #1073
2017-09-19 22:21:45 +02:00
Florian Bruhin
505321c336 Drop support for Python 3.4
See #2742
2017-09-18 23:01:17 +02:00
Florian Bruhin
a2f16dbecd Merge standarddir.system_data() into standarddir.data(system=True)
See #2791
2017-09-13 17:26:56 +02:00
Florian Bruhin
1fe1cd45f5 Remove dead code
This code is not called/needed anymore with the changes done in the new-config
branch.
2017-09-13 17:26:56 +02:00
Florian Bruhin
978013e750 Fix CommandParser and don't use a generator 2017-07-04 15:08:03 +02:00
Florian Bruhin
df1685905e Add content.headers and content.cache groups 2017-07-04 15:08:03 +02:00
Florian Bruhin
94ac2ca56c Merge :wq into :quit and add an alias 2017-07-04 15:08:03 +02:00
Florian Bruhin
ac78039171 Use aliases for :w and :q 2017-07-04 15:08:03 +02:00
Florian Bruhin
9cbacf3264 Use {} for none-dicts and fix keybindings 2017-07-04 15:08:03 +02:00
Florian Bruhin
290d27a064 Add a cmdexc.Error 2017-07-04 15:08:02 +02:00
Florian Bruhin
a6c629899e Split CommandRunner into runner/parser 2017-07-04 15:08:02 +02:00