mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 16:56:09 +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();
|
var walker = dir.iterate();
|
||||||
|
|
||||||
while (try walker.next()) |entry| {
|
while (try walker.next()) |entry| {
|
||||||
if (entry.kind != .file) continue;
|
switch (entry.kind) {
|
||||||
|
.file, .sym_link => {
|
||||||
count += 1;
|
count += 1;
|
||||||
try themes.append(.{
|
try themes.append(.{
|
||||||
.location = loc.location,
|
.location = loc.location,
|
||||||
.path = try std.fs.path.join(alloc, &.{ loc.dir, entry.name }),
|
.path = try std.fs.path.join(alloc, &.{ loc.dir, entry.name }),
|
||||||
.theme = try alloc.dupe(u8, entry.name),
|
.theme = try alloc.dupe(u8, entry.name),
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
else => {},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user