update navigate-related help and function docs

This commit is contained in:
Peter Rice 2016-08-15 21:22:22 -04:00
parent d3e4d62d14
commit 060305279c
4 changed files with 8 additions and 0 deletions

View File

@ -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']+

View File

@ -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("'")

View File

@ -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 == '/':

View File

@ -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'}