autodetect watchlist in cwd
All checks were successful
Generic zig build / build (push) Successful in 42s
All checks were successful
Generic zig build / build (push) Successful in 42s
This commit is contained in:
parent
afcc24be5e
commit
3ae53f15b0
1 changed files with 6 additions and 0 deletions
|
|
@ -189,6 +189,12 @@ pub fn main() !u8 {
|
||||||
file_path = args[pi];
|
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);
|
try commands.portfolio.run(allocator, &svc, file_path, watchlist_path, force_refresh, color, out);
|
||||||
} else if (std.mem.eql(u8, command, "lookup")) {
|
} else if (std.mem.eql(u8, command, "lookup")) {
|
||||||
if (args.len < 3) {
|
if (args.len < 3) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue