From 11ebc74628a09fc0ef44edfcc6e0449f6b3c435c Mon Sep 17 00:00:00 2001 From: "Nicholas A. Zigarovich" Date: Fri, 9 Jan 2009 10:02:54 -0500 Subject: [PATCH] Added confirm-quit command. --- modules/commands.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/commands.js b/modules/commands.js index 49e6a11..7428f9a 100644 --- a/modules/commands.js +++ b/modules/commands.js @@ -22,6 +22,15 @@ interactive("quit", "Quit Conkeror", quit); +interactive("confirm-quit", + "Quit Conkeror with confirmation", + function (I) { + let result = yield I.window.minibuffer.read_single_character_option( + $prompt = "Quit Conkeror? (y/n)", + $options = ["y", "n"]); + if (result == "y") + quit(); + }); function show_conkeror_version (window) { -- 2.11.4.GIT