autodetect watchlist in cwd
All checks were successful
Generic zig build / build (push) Successful in 42s

This commit is contained in:
Emil Lerch 2026-03-31 17:14:39 -07:00
parent afcc24be5e
commit 3ae53f15b0
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -189,6 +189,12 @@ pub fn main() !u8 {
file_path = args[pi];
}
}
// Auto-detect watchlist.srf in cwd if not explicitly provided (same as TUI)
if (watchlist_path == null) {
if (std.fs.cwd().access("watchlist.srf", .{})) |_| {
watchlist_path = "watchlist.srf";
} else |_| {}
}
try commands.portfolio.run(allocator, &svc, file_path, watchlist_path, force_refresh, color, out);
} else if (std.mem.eql(u8, command, "lookup")) {
if (args.len < 3) {