on master help sign in
Fix missing shell '-i' option when checking for wrapper in info.sh
c33af35Ethan P
diagnostics/info.sh+3−4
@@ -35,7 +35,6 @@ _tool_:description() {
35 _collects "Version information for 'less'."
35 _collects "Version information for 'less'."
36}
36}
37
37
38−
39# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
38# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
40
39
41_bat_:run() {
40_bat_:run() {
@@ -71,14 +70,14 @@ _bat_wrapper_:run() {
71_bat_wrapper_function_:run() {
70_bat_wrapper_function_:run() {
72 case "$("$SHELL" --version | head -n 1)" in
71 case "$("$SHELL" --version | head -n 1)" in
73 *fish*)
72 *fish*)
74− if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
73+ if "$SHELL" --login -i -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
75 _out_fence "$SHELL" --login -c 'functions bat'
74 _out_fence "$SHELL" --login -c 'functions bat'
76 return
75 return
77 fi ;;
76 fi ;;
78
77
79 *bash*|*zsh*)
78 *bash*|*zsh*)
80− if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
79+ if "$SHELL" --login -i -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then
81− _out_fence "$SHELL" --login -i -c 'declare -f bat'
80+ _out_fence "$SHELL" --login -c 'declare -f bat'
82 return
81 return
83 fi ;;
82 fi ;;
84
83