mirror of
				https://gitlab.com/ceda_ei/wish
				synced 2025-10-31 10:00:04 +01:00 
			
		
		
		
	Add WISH_AUTONEWLINE. Adds a newline is the output doesn't end with \n
This commit is contained in:
		
							
								
								
									
										6
									
								
								wish.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								wish.sh
									
									
									
									
									
								
							| @@ -69,6 +69,12 @@ function wish_main() { | ||||
| 	local prev=$? | ||||
| 	PS1="" | ||||
| 	local i | ||||
| 	if [[ $WISH_AUTONEWLINE != 0 ]]; then | ||||
| 		echo -ne "\033[6n" ; read -s -d ';'; read -s -d R WISH_CURSOR_POSITION | ||||
| 		if [[ $WISH_CURSOR_POSITION != "1" ]]; then | ||||
| 			PS1="\n" | ||||
| 		fi | ||||
| 	fi | ||||
| 	for i in $(seq 0 $((${#WISH_PLUGINS[@]} - 1))); do | ||||
| 		wish_${WISH_PLUGINS[i]}_main $prev | ||||
| 		if [[ -v WISH_POWERLINE ]] && [[ $WISH_POWERLINE != 0 ]]; then | ||||
|   | ||||
		Reference in New Issue
	
	Block a user