Change quit to only close the current window.
Adds the --all option to quit to behave the same as before. Also changes wq to wqa to reflect the change.
This commit is contained in:
@@ -679,14 +679,18 @@ class Quitter:
|
||||
|
||||
@cmdutils.register(instance='quitter', name='quit')
|
||||
@cmdutils.argument('session', completion=miscmodels.session)
|
||||
def quit(self, save=False, session=None):
|
||||
def quit(self, all=False, save=False, session=None):
|
||||
"""Quit qutebrowser.
|
||||
|
||||
Args:
|
||||
all: When given, closes all windows and kills the current instance
|
||||
save: When given, save the open windows even if auto_save.session
|
||||
is turned off.
|
||||
session: The name of the session to save.
|
||||
"""
|
||||
if not all:
|
||||
window = QApplication.activeWindow()
|
||||
window.close()
|
||||
return
|
||||
if session is not None and not save:
|
||||
raise cmdexc.CommandError("Session name given without --save!")
|
||||
if save:
|
||||
|
||||
@@ -4,7 +4,8 @@ aliases:
|
||||
default:
|
||||
w: session-save
|
||||
q: quit
|
||||
wq: quit --save
|
||||
qa: quit --all
|
||||
wqa: quit --all --save
|
||||
type:
|
||||
name: Dict
|
||||
keytype:
|
||||
|
||||
Reference in New Issue
Block a user