feat: add commands to execute shell tasks from keybindings

This is the first part of #67.
This commit is contained in:
CJ van den Berg 2025-01-07 22:42:52 +01:00
parent 337b6ce626
commit cfc99b61dc
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 259 additions and 3 deletions

View file

@ -3603,6 +3603,9 @@ pub const Editor = struct {
if (ctx.args.match(.{ tp.extract(&file_path), tp.extract(&content) }) catch false) {
try self.open_scratch(file_path, content);
self.clamp();
} else if (ctx.args.match(.{tp.extract(&file_path)}) catch false) {
try self.open_scratch(file_path, "");
self.clamp();
} else return error.InvalidOpenScratchBufferArgument;
}
pub const open_scratch_buffer_meta = .{ .arguments = &.{ .string, .string } };