diff --git a/src/main.zig b/src/main.zig index 9d12799..c14cd8f 100644 --- a/src/main.zig +++ b/src/main.zig @@ -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) {