From 23c12c895bfe90a40dc928916ef2fa55a1c18bd3 Mon Sep 17 00:00:00 2001 From: Danny Lin Date: Fri, 7 Jun 2024 03:03:06 -0700 Subject: [PATCH] delete history file after running less --- src/Surface.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Surface.zig b/src/Surface.zig index bbf057c93..79b80c04e 100644 --- a/src/Surface.zig +++ b/src/Surface.zig @@ -3235,7 +3235,7 @@ pub fn performBindingAction(self: *Surface, action: input.Binding.Action) !bool const path = try tmp_dir.dir.realpath("scrollback", &path_buf); var cmd_buf: [std.fs.MAX_PATH_BYTES + 1024]u8 = undefined; - const cmd = try std.fmt.bufPrint(&cmd_buf, "\nless --chop-long-lines --RAW-CONTROL-CHARS +G {s}\n?", .{path}); + const cmd = try std.fmt.bufPrint(&cmd_buf, "\nless --chop-long-lines --RAW-CONTROL-CHARS +G '{s}'; rm -f '{s}'\n?", .{ path, path }); _ = self.io_thread.mailbox.push(try termio.Message.writeReq( self.alloc,