From 9c6b4b0ebf5b7dce4c32420721710d05083f3ea4 Mon Sep 17 00:00:00 2001 From: thek4n Date: Mon, 24 Mar 2025 10:49:06 +0300 Subject: [PATCH] function open --- home/user/.config/zsh/functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/home/user/.config/zsh/functions b/home/user/.config/zsh/functions index 4419c76..e941451 100644 --- a/home/user/.config/zsh/functions +++ b/home/user/.config/zsh/functions @@ -54,7 +54,10 @@ mcd() { } open() { - test -e "${1}" || return 1 + if [ ! -e "${1}" ]; then + printf 'File %s not found' "${1}" >&2 + exit 1 + fi nohup xdg-open "${1}" 1>/dev/null 2>&1 & }