Patch from Matt Kraai to fox sh.c escape problem such that
running things like 'echo "\n\tHi\n\t\!"' and 'echo -e "\n\tHi\n\t\!"' behave as under bash.
This commit is contained in:
		
							
								
								
									
										4
									
								
								sh.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								sh.c
									
									
									
									
									
								
							@@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi
 | 
			
		||||
				}
 | 
			
		||||
 | 
			
		||||
				/* in shell, "\'" should yield \' */
 | 
			
		||||
				if (*src != quote)
 | 
			
		||||
				if (*src != quote) {
 | 
			
		||||
					*buf++ = '\\';
 | 
			
		||||
					*buf++ = '\\';
 | 
			
		||||
				}
 | 
			
		||||
			} else if (*src == '*' || *src == '?' || *src == '[' ||
 | 
			
		||||
					   *src == ']') *buf++ = '\\';
 | 
			
		||||
			*buf++ = *src;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user