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:
Aaron Gorodetzky
2018-07-12 03:10:59 -04:00
parent 0a882739c8
commit 49b9144cf0
2 changed files with 8 additions and 3 deletions

View File

@@ -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:

View File

@@ -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: