on master help sign in
Add zsh wrapper detection to info.sh
2f4ecf8Ethan P
diagnostics/info.sh+4−2
@@ -73,11 +73,13 @@ _bat_wrapper_function_:run() {
73 *fish*)
73 *fish*)
74 if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
74 if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
75 _out_fence "$SHELL" --login -c 'functions bat'
75 _out_fence "$SHELL" --login -c 'functions bat'
76+ return
76 fi ;;
77 fi ;;
77
78
78− *bash*)
79+ *bash*|*zsh*)
79 if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
80 if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
80− _out_fence "$SHELL" --login -c 'declare -f bat'
81+ _out_fence "$SHELL" --login -i -c 'declare -f bat'
82+ return
81 fi ;;
83 fi ;;
82
84
83 *)
85 *)