Add a :quickmark-del command.
This commit is contained in:
parent
d0b5f2087a
commit
5eeb89ec86
@ -23,6 +23,7 @@
|
|||||||
|<<paste,paste>>|Open a page from the clipboard.
|
|<<paste,paste>>|Open a page from the clipboard.
|
||||||
|<<print,print>>|Print the current/[count]th tab.
|
|<<print,print>>|Print the current/[count]th tab.
|
||||||
|<<quickmark-add,quickmark-add>>|Add a new quickmark.
|
|<<quickmark-add,quickmark-add>>|Add a new quickmark.
|
||||||
|
|<<quickmark-del,quickmark-del>>|Delete a quickmark.
|
||||||
|<<quickmark-load,quickmark-load>>|Load a quickmark.
|
|<<quickmark-load,quickmark-load>>|Load a quickmark.
|
||||||
|<<quickmark-save,quickmark-save>>|Save the current page as a quickmark.
|
|<<quickmark-save,quickmark-save>>|Save the current page as a quickmark.
|
||||||
|<<quit,quit>>|Quit qutebrowser.
|
|<<quit,quit>>|Quit qutebrowser.
|
||||||
@ -281,6 +282,15 @@ Add a new quickmark.
|
|||||||
* +'url'+: The url to add as quickmark.
|
* +'url'+: The url to add as quickmark.
|
||||||
* +'name'+: The name for the new quickmark.
|
* +'name'+: The name for the new quickmark.
|
||||||
|
|
||||||
|
[[quickmark-del]]
|
||||||
|
=== quickmark-del
|
||||||
|
Syntax: +:quickmark-del 'name'+
|
||||||
|
|
||||||
|
Delete a quickmark.
|
||||||
|
|
||||||
|
==== positional arguments
|
||||||
|
* +'name'+: The name of the quickmark to delete.
|
||||||
|
|
||||||
[[quickmark-load]]
|
[[quickmark-load]]
|
||||||
=== quickmark-load
|
=== quickmark-load
|
||||||
Syntax: +:quickmark-load [*--tab*] [*--bg*] [*--window*] 'name'+
|
Syntax: +:quickmark-load [*--tab*] [*--bg*] [*--window*] 'name'+
|
||||||
|
@ -110,6 +110,21 @@ class QuickmarkManager(QObject):
|
|||||||
else:
|
else:
|
||||||
set_mark()
|
set_mark()
|
||||||
|
|
||||||
|
@cmdutils.register(instance='quickmark-manager', split=False,
|
||||||
|
completion=[usertypes.Completion.quickmark_by_name])
|
||||||
|
def quickmark_del(self, name):
|
||||||
|
"""Delete a quickmark.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
name: The name of the quickmark to delete.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
del self.marks[name]
|
||||||
|
except KeyError:
|
||||||
|
raise cmdexc.CommandError("Quickmark '{}' not found!".format(name))
|
||||||
|
else:
|
||||||
|
self.changed.emit()
|
||||||
|
|
||||||
def get(self, name):
|
def get(self, name):
|
||||||
"""Get the URL of the quickmark named name as a QUrl."""
|
"""Get the URL of the quickmark named name as a QUrl."""
|
||||||
if name not in self.marks:
|
if name not in self.marks:
|
||||||
|
Loading…
Reference in New Issue
Block a user