From 060305279cf90c95d2f5e348f547b5f4be561dda Mon Sep 17 00:00:00 2001 From: Peter Rice Date: Mon, 15 Aug 2016 21:22:22 -0400 Subject: [PATCH] update navigate-related help and function docs --- doc/help/commands.asciidoc | 3 +++ qutebrowser/browser/commands.py | 2 ++ qutebrowser/browser/navigate.py | 2 ++ qutebrowser/utils/urlutils.py | 1 + 4 files changed, 8 insertions(+) diff --git a/doc/help/commands.asciidoc b/doc/help/commands.asciidoc index 4a90783f8..4f9451ded 100644 --- a/doc/help/commands.asciidoc +++ b/doc/help/commands.asciidoc @@ -480,6 +480,9 @@ This tries to automatically click on typical _Previous Page_ or _Next Page_ link * +*-b*+, +*--bg*+: Open in a background tab. * +*-w*+, +*--window*+: Open in a new window. +==== count +For `increment` and `decrement`, the number to change the URL by. For `up`, the number of levels to go up in the URL. + [[open]] === open Syntax: +:open [*--implicit*] [*--bg*] [*--tab*] [*--window*] ['url']+ diff --git a/qutebrowser/browser/commands.py b/qutebrowser/browser/commands.py index 5438b29a0..04a15fabb 100644 --- a/qutebrowser/browser/commands.py +++ b/qutebrowser/browser/commands.py @@ -503,6 +503,8 @@ class CommandDispatcher: tab: Open in a new tab. bg: Open in a background tab. window: Open in a new window. + count: How much to increment or decrement the URL by, or number of + levels to go up in the current URL. """ # save the pre-jump position in the special ' mark self.set_mark("'") diff --git a/qutebrowser/browser/navigate.py b/qutebrowser/browser/navigate.py index 2d5b0aab3..0a7328047 100644 --- a/qutebrowser/browser/navigate.py +++ b/qutebrowser/browser/navigate.py @@ -36,6 +36,7 @@ def incdec(url, count, inc_or_dec): Args: url: The current url. + count: How much to increment or decrement by. inc_or_dec: Either 'increment' or 'decrement'. tab: Whether to open the link in a new tab. background: Open the link in a new background tab. @@ -54,6 +55,7 @@ def path_up(url, count): Args: url: The current url. + count: The number of levels to go up in the url. """ path = url.path() if not path or path == '/': diff --git a/qutebrowser/utils/urlutils.py b/qutebrowser/utils/urlutils.py index d37a2772e..7e1b8ea9e 100644 --- a/qutebrowser/utils/urlutils.py +++ b/qutebrowser/utils/urlutils.py @@ -527,6 +527,7 @@ def incdec_number(url, incdec, count=1, segments=None): Args: url: The current url incdec: Either 'increment' or 'decrement' + count: The number to increment or decrement by segments: A set of URL segments to search. Valid segments are: 'host', 'path', 'query', 'anchor'. Default: {'path', 'query'}