mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Trim "s from process names, from Gregory Pakosz.
This commit is contained in:
		
							
								
								
									
										6
									
								
								names.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								names.c
									
									
									
									
									
								
							@@ -107,7 +107,7 @@ check_window_name(struct window *w)
 | 
			
		||||
char *
 | 
			
		||||
default_window_name(struct window *w)
 | 
			
		||||
{
 | 
			
		||||
	char    *cmd, *s;
 | 
			
		||||
	char	*cmd, *s;
 | 
			
		||||
 | 
			
		||||
	cmd = cmd_stringify_argv(w->active->argc, w->active->argv);
 | 
			
		||||
	if (cmd != NULL && *cmd != '\0')
 | 
			
		||||
@@ -142,6 +142,10 @@ parse_window_name(const char *in)
 | 
			
		||||
	char	*copy, *name, *ptr;
 | 
			
		||||
 | 
			
		||||
	name = copy = xstrdup(in);
 | 
			
		||||
	if (*name == '"')
 | 
			
		||||
		name++;
 | 
			
		||||
	name[strcspn (name, "\"")] = '\0';
 | 
			
		||||
 | 
			
		||||
	if (strncmp(name, "exec ", (sizeof "exec ") - 1) == 0)
 | 
			
		||||
		name = name + (sizeof "exec ") - 1;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user