Problem 1: Entering a command of `:::save` gives an error.
Problem 2: Entering a command of `:save\n` gives an error.
Both scenarios may seem a bit silly at first, but I encountered both by
copy/pasting a command:
1. Enter `:` in qutebrowser.
2. Copy a full line from a terminal starting with `:`.
3. You will now have both of the above problems.
Solution: Trim all whitespace and `:` of a command. This is also what
Vim does, by the way.
This really tripped me up yesterday, My "Vim default" is to use tabs.
This (where `!···` is a tab) does not work as you'll hope it works:
Scenario: Retrying a failed download when the directory didn't exist (issue 2445)
When I download http://localhost:(port)/data/downloads/download.bin to <path>
And I wait for the error "Download error: No such file or directory: *"
And I make the directory <mkdir>
And I run :download-retry
!···!···And I wait until the download is finished
Then the downloaded file <expected> should exist
Examples:
| path | mkdir | expected |
| asd/zxc/ | asd/zxc | asd/zxc/download.bin |
Unfortunately, pytest-bdd uses the "Python 2 behaviour" of "expand all
tabs to 8 spaces", and doesn't give any errors on strange/inconsistent
whitespace. It can cause very confusing errors.
Problem: I like to edit `~/.config/qutebrowser/qutebrowser.conf`
manually with Vim. This works great, except that the current format is a
bit of a pain to deal with:
[section-name]
# section description
#
# [ Description of all the options]
actual options
So if I want to know the description or what the default value is, I
need to scroll up and back down.
Solution: change the order of the comments to:
# section description
[section-name]
# Option description
option = value
# Option description two
optiontwo = value
# Hello, world!
[section-two]
...
Which is much more convenient (and also what almost any other program
does).
(This patch changes much less code than it looks in the diff; I just
de-looped and moved `_str_option_desc` below `_str_items` as that makes
more sense since it gets called by `_str_items`).