From fe0f355277b220f304b2e58695349add20741e91 Mon Sep 17 00:00:00 2001 From: kj-sh604 Date: Wed, 17 Jul 2024 22:27:14 -0400 Subject: feat: new POSIX and fish functions --- .config/shell/posix-functions/POSIX_open.sh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .config/shell/posix-functions/POSIX_open.sh (limited to '.config/shell/posix-functions/POSIX_open.sh') diff --git a/.config/shell/posix-functions/POSIX_open.sh b/.config/shell/posix-functions/POSIX_open.sh new file mode 100644 index 0000000..b53e93f --- /dev/null +++ b/.config/shell/posix-functions/POSIX_open.sh @@ -0,0 +1,6 @@ +open() { + command -v xdg-open > /dev/null && xdg-open "$@" && return + [ "$(uname)" = "Darwin" ] && open "$@" && return + [ "$(uname)" = "Haiku" ] && open "$@" && return + echo "error: could not detect the open command for your system." && return 1 +} -- cgit v1.2.3