feat: add git branch widget

This commit is contained in:
CJ van den Berg 2025-04-20 22:51:43 +02:00
parent 845403f2ae
commit 45574ff5c5
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 83 additions and 9 deletions

View file

@ -2,7 +2,6 @@ const std = @import("std");
const tp = @import("thespian");
const cbor = @import("cbor");
const tracy = @import("tracy");
const git = @import("git");
const ripgrep = @import("ripgrep");
const root = @import("root");
const location_history = @import("location_history");
@ -828,11 +827,6 @@ const cmds = struct {
}
pub const find_in_files_query_meta: Meta = .{ .arguments = &.{.string} };
pub fn git_branch(self: *Self, _: Ctx) Result {
try git.get_current_branch(self.allocator);
}
pub const git_branch_meta: Meta = .{ .description = "Get the current git branch" };
pub fn shell_execute_log(self: *Self, ctx: Ctx) Result {
if (!try ctx.args.match(.{ tp.string, tp.more }))
return error.InvalidShellArgument;