diff options
author | xyz <gky44px1999@gmail.com> | 2021-11-03 21:34:31 -0700 |
---|---|---|
committer | xyz <gky44px1999@gmail.com> | 2021-11-03 21:34:31 -0700 |
commit | 855396524f8758b709f530576aac80147365d7fa (patch) | |
tree | dd9b84097369c284d048967c667e6ac52bf7f406 /home/xyz/.local/bin/o | |
parent | 0b6b84bb31f42f3f8b6ed8da2900c052b095787f (diff) |
o consider xdg-open dir
Diffstat (limited to 'home/xyz/.local/bin/o')
-rwxr-xr-x | home/xyz/.local/bin/o | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/home/xyz/.local/bin/o b/home/xyz/.local/bin/o index 21464974..38c74968 100755 --- a/home/xyz/.local/bin/o +++ b/home/xyz/.local/bin/o @@ -8,7 +8,7 @@ # I don't care about errors, I don't want to handle errors, just shut up please. # nohup seems not necessary if don't care about daemon SIGHUP requirement -if [ $# -eq 1 ] && [ -e "$1" ] && ! [ -x "$1" ]; then +if [ $# -eq 1 ] && [ -e "$1" ] && { ! [ -x "$1" ] || [ -d "$1" ];}; then nohup xdg-open "$1" 0<&- >&- 2>&- & else nohup "$@" 0<&- >&- 2>&- & |