feat: add save_session_quiet command and make save_session verbose
This commit is contained in:
parent
921c17de3c
commit
719eed4cfd
1 changed files with 9 additions and 0 deletions
|
|
@ -356,10 +356,19 @@ const cmds = struct {
|
|||
pub const quit_without_saving_meta: Meta = .{ .description = "Quit without saving" };
|
||||
|
||||
pub fn save_session(self: *Self, _: Ctx) Result {
|
||||
const logger = log.logger("session");
|
||||
defer logger.deinit();
|
||||
logger.print("saving session...", .{});
|
||||
try self.write_restore_info();
|
||||
logger.print("session saved", .{});
|
||||
}
|
||||
pub const save_session_meta: Meta = .{ .description = "Save session" };
|
||||
|
||||
pub fn save_session_quiet(self: *Self, _: Ctx) Result {
|
||||
try self.write_restore_info();
|
||||
}
|
||||
pub const save_session_quiet_meta: Meta = .{};
|
||||
|
||||
pub fn save_session_and_quit(self: *Self, _: Ctx) Result {
|
||||
try self.write_restore_info();
|
||||
try tp.self_pid().send("quit");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue