From 93f2df7d28a177872db1ca0815a3d1bc99295cf1 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 1 Jan 2023 14:59:21 +0800 Subject: Update config of z.sh --- .zrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '.zrc') diff --git a/.zrc b/.zrc index 6b289fa..5856f5c 100755 --- a/.zrc +++ b/.zrc @@ -1,8 +1,9 @@ #!/usr/bin/env bash -if [ ! -f /usr/share/z/z.sh -a ! -f /usr/local/etc/profile.d/z.sh ]; then - return -fi +[[ -r /usr/share/z/z.sh ]] && source /usr/share/z/z.sh +[[ -r /usr/local/etc/profile.d/z.sh ]] && source /usr/local/etc/profile.d/z.sh + +[ ! -f /usr/share/z/z.sh -a ! -f /usr/local/etc/profile.d/z.sh ] && return if command -v fzf &> /dev/null; then unalias j 2> /dev/null -- cgit v1.2.3