autodetect watchlist in cwd
This commit is contained in:
parent
2b1880fa46
commit
787acf05ec
1 changed files with 6 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue