From 5671a1eef64379979e9e398d3995c2331f32964f Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 12 Jul 2022 15:49:58 -0400 Subject: [PATCH] Add "open" function to fork xdg-open --- home/lib/login_functions.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/home/lib/login_functions.sh b/home/lib/login_functions.sh index 3bf7676..7bd88cb 100644 --- a/home/lib/login_functions.sh +++ b/home/lib/login_functions.sh @@ -1,5 +1,16 @@ # +## open : string -> unit +## +## Fork xdg-open so we don't block current terminal session when opening +## things like pdf files. For example: +## +## open book.pdf +## +open() { + (xdg-open "$1" &) & +} + ## notify_done : unit -> unit notify_done() { local -r _status_code="$?" -- 2.20.1