summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorAndrew Guschin <guschin@altlinux.org>2024-02-14 16:27:34 +0400
committerAndrew Guschin <guschin@altlinux.org>2024-02-14 16:27:34 +0400
commitee050df50478a90d518db3e76d6b22b3f9b56378 (patch)
treebd81238f217df6481216cf2639df8a31362eceb5 /.zshrc
parent7dd8e0436be664ce4a00cccca749e792b5d2532f (diff)
add open() function in zshrc for macos-like use of xdg-open
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc4
1 files changed, 4 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index 288da88..74ea9dd 100644
--- a/.zshrc
+++ b/.zshrc
@@ -47,6 +47,10 @@ cdf() {
cd "$(find ~ -type d &>/dev/null | fzf)"
}
+open() {
+ setsid xdg-open $@
+}
+
set_prompt() {
# red color if current user is root, otherwise - green
[ "$USER" = "root" ] && UCOLOR="%B%F{red}" || UCOLOR="%B%F{green}"