Fix sed regexp

It's either this or the ending `$` shouldn't be escaped.
This commit is contained in:
Sylvain Rabot
2024-11-25 13:41:34 +01:00
committed by GitHub
parent 4c2d462000
commit 3348c8a638

View File

@ -53,7 +53,7 @@ fn writeFishCompletions(writer: anytype) !void {
if (std.mem.startsWith(u8, field.name, "font-family"))
try writer.writeAll(" -f -a \"(ghostty +list-fonts | grep '^[A-Z]')\"")
else if (std.mem.eql(u8, "theme", field.name))
try writer.writeAll(" -f -a \"(ghostty +list-themes | sed -E 's/^(.*) \\(.*\\$/\\1/')\"")
try writer.writeAll(" -f -a \"(ghostty +list-themes | sed -E 's/^(.*) \\(.*\\)$/\\1/')\"")
else if (std.mem.eql(u8, "working-directory", field.name))
try writer.writeAll(" -f -k -a \"(__fish_complete_directories)\"")
else {