mirror of
				https://github.com/sharkdp/bat.git
				synced 2025-10-31 15:12:12 +00:00 
			
		
		
		
	Fix missing shell '-i' option when checking for wrapper in info.sh
This commit is contained in:
		| @@ -35,7 +35,6 @@ _tool_:description() { | |||||||
| 	_collects "Version information for 'less'." | 	_collects "Version information for 'less'." | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
| # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||||||
|  |  | ||||||
| _bat_:run() { | _bat_:run() { | ||||||
| @@ -71,14 +70,14 @@ _bat_wrapper_:run() { | |||||||
| _bat_wrapper_function_:run() { | _bat_wrapper_function_:run() { | ||||||
| 	case "$("$SHELL" --version | head -n 1)" in | 	case "$("$SHELL" --version | head -n 1)" in | ||||||
| 		*fish*) | 		*fish*) | ||||||
| 			if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then | 			if "$SHELL" --login -i -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then | ||||||
| 				_out_fence "$SHELL" --login -c 'functions bat' | 				_out_fence "$SHELL" --login -c 'functions bat' | ||||||
| 				return | 				return | ||||||
| 			fi ;; | 			fi ;; | ||||||
|  |  | ||||||
| 		*bash*|*zsh*) | 		*bash*|*zsh*) | ||||||
| 			if "$SHELL" --login -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then | 			if "$SHELL" --login -i -c 'type bat' 2>&1 | grep 'function' &>/dev/null; then | ||||||
| 				_out_fence "$SHELL" --login -i -c 'declare -f bat' | 				_out_fence "$SHELL" --login -c 'declare -f bat' | ||||||
| 				return | 				return | ||||||
| 			fi ;; | 			fi ;; | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user