diff --git a/zsh/.config/zsh/functions.zsh b/zsh/.config/zsh/functions.zsh index 31a66de..cb0bd64 100644 --- a/zsh/.config/zsh/functions.zsh +++ b/zsh/.config/zsh/functions.zsh @@ -53,7 +53,11 @@ http() { } open() { - (( ${+commands[xdg-open]} )) || return 2 - nohup xdg-open "$@" &> /dev/null & disown + if [[ $# -gt 1 ]] && (( ${+commands[$1]} )); then + nohup "$@" &> /dev/null & disown + else + (( ${+commands[xdg-open]} )) || return 2 + nohup xdg-open "$@" &> /dev/null & disown + fi }