Make open support specifying program

This commit is contained in:
Sam A. 2022-07-18 16:04:45 +02:00
parent f9f9d2ade2
commit c5636a081c
Signed by: samsapti
GPG key ID: CBBBE7371E81C4EA

View file

@ -53,7 +53,11 @@ http() {
}
open() {
if [[ $# -gt 1 ]] && (( ${+commands[$1]} )); then
nohup "$@" &> /dev/null & disown
else
(( ${+commands[xdg-open]} )) || return 2
nohup xdg-open "$@" &> /dev/null & disown
fi
}