aboutsummaryrefslogtreecommitdiffstats
path: root/lib/open.go
Commit message (Collapse)AuthorAgeFilesLines
* logging: added a log on panicMoritz Poldrack2022-03-231-0/+4
| | | | | | | | | | | | | Since panics still regularly "destroy" the terminal, it is hard to get a stack trace for panics you do not anticipate. This commit adds a panic handler that automatically creates a logfile inside the current working directory. It has to be added to every goroutine that is started and will repair the terminal on a panic. Signed-off-by: Moritz Poldrack <git@moritz.sh> Acked-by: Robin Jarry <robin@jarry.cc>
* Refactor lib/open to accept user provided argumentsReto Brunner2021-01-301-12/+51
| | | | | | | | | | | | * Get rid of open_darwin It just lead to code duplication for a simple one string change. Instead we query it during initialization * Accept user provided arguments "open" on MacOS accepts things like -A to use a specific application Pass trough arguments the user provided in order to facilitate this * Refactor the function to a struct This makes it more convenient for the caller and avoids signatures like lib.OpenFile(nil, u.String(), nil) which are fairly unreadable
* Allow open to be asynchronousAndrew Jeffery2020-07-081-2/+13
| | | | | | This stops the ui being blocked while the resource is opened. The wait ensures that resources are reclaimed when the process finishes while aerc is still running.
* Use "open" instead of "xdg-open" on Darwin systemsBen Burwell2019-07-041-0/+12