Add "open" function to fork xdg-open
authorSiraaj Khandkar <siraaj@khandkar.net>
Tue, 12 Jul 2022 19:49:58 +0000 (15:49 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Tue, 12 Jul 2022 19:54:56 +0000 (15:54 -0400)
home/lib/login_functions.sh

index 3bf7676..7bd88cb 100644 (file)
@@ -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="$?"
This page took 0.025757 seconds and 4 git commands to generate.