Make open support specifying program
This commit is contained in:
parent
f9f9d2ade2
commit
c5636a081c
|
@ -53,7 +53,11 @@ http() {
|
||||||
}
|
}
|
||||||
|
|
||||||
open() {
|
open() {
|
||||||
(( ${+commands[xdg-open]} )) || return 2
|
if [[ $# -gt 1 ]] && (( ${+commands[$1]} )); then
|
||||||
nohup xdg-open "$@" &> /dev/null & disown
|
nohup "$@" &> /dev/null & disown
|
||||||
|
else
|
||||||
|
(( ${+commands[xdg-open]} )) || return 2
|
||||||
|
nohup xdg-open "$@" &> /dev/null & disown
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue