mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
cli: list-themes should list symlinks
Symbolic links should be listed in addition to normal files. Useful for system like home-manager that link config files to location in the Nix store.
This commit is contained in:

committed by
Mitchell Hashimoto

parent
743e547235
commit
a6a4f9ff8e
@ -114,13 +114,17 @@ pub fn run(gpa_alloc: std.mem.Allocator) !u8 {
|
||||
var walker = dir.iterate();
|
||||
|
||||
while (try walker.next()) |entry| {
|
||||
if (entry.kind != .file) continue;
|
||||
count += 1;
|
||||
try themes.append(.{
|
||||
.location = loc.location,
|
||||
.path = try std.fs.path.join(alloc, &.{ loc.dir, entry.name }),
|
||||
.theme = try alloc.dupe(u8, entry.name),
|
||||
});
|
||||
switch (entry.kind) {
|
||||
.file, .sym_link => {
|
||||
count += 1;
|
||||
try themes.append(.{
|
||||
.location = loc.location,
|
||||
.path = try std.fs.path.join(alloc, &.{ loc.dir, entry.name }),
|
||||
.theme = try alloc.dupe(u8, entry.name),
|
||||
});
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user