mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:44:18 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										6
									
								
								cmd.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								cmd.c
									
									
									
									
									
								
							@@ -660,7 +660,7 @@ char *
 | 
				
			|||||||
cmd_template_replace(const char *template, const char *s, int idx)
 | 
					cmd_template_replace(const char *template, const char *s, int idx)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	char		 ch, *buf;
 | 
						char		 ch, *buf;
 | 
				
			||||||
	const char	*ptr, *cp, quote[] = "\"\\$";
 | 
						const char	*ptr, *cp, quote[] = "\"\\$;";
 | 
				
			||||||
	int		 replaced, quoted;
 | 
						int		 replaced, quoted;
 | 
				
			||||||
	size_t		 len;
 | 
						size_t		 len;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -691,10 +691,6 @@ cmd_template_replace(const char *template, const char *s, int idx)
 | 
				
			|||||||
			for (cp = s; *cp != '\0'; cp++) {
 | 
								for (cp = s; *cp != '\0'; cp++) {
 | 
				
			||||||
				if (quoted && strchr(quote, *cp) != NULL)
 | 
									if (quoted && strchr(quote, *cp) != NULL)
 | 
				
			||||||
					buf[len++] = '\\';
 | 
										buf[len++] = '\\';
 | 
				
			||||||
				if (quoted && *cp == ';') {
 | 
					 | 
				
			||||||
					buf[len++] = '\\';
 | 
					 | 
				
			||||||
					buf[len++] = '\\';
 | 
					 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
				buf[len++] = *cp;
 | 
									buf[len++] = *cp;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			buf[len] = '\0';
 | 
								buf[len] = '\0';
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user