mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Rename session idx to session id throughout and add $ prefix to targets
to use it, extended from a diff from George Nachman.
This commit is contained in:
		
							
								
								
									
										8
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								tmux.c
									
									
									
									
									
								
							@@ -49,7 +49,7 @@ char		 socket_path[MAXPATHLEN];
 | 
			
		||||
int		 login_shell;
 | 
			
		||||
char		*environ_path;
 | 
			
		||||
pid_t		 environ_pid = -1;
 | 
			
		||||
int		 environ_idx = -1;
 | 
			
		||||
int		 environ_session_id = -1;
 | 
			
		||||
 | 
			
		||||
__dead void	 usage(void);
 | 
			
		||||
void	 	 parseenvironment(void);
 | 
			
		||||
@@ -144,16 +144,16 @@ parseenvironment(void)
 | 
			
		||||
{
 | 
			
		||||
	char	*env, path[256];
 | 
			
		||||
	long	 pid;
 | 
			
		||||
	int	 idx;
 | 
			
		||||
	int	 id;
 | 
			
		||||
 | 
			
		||||
	if ((env = getenv("TMUX")) == NULL)
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
	if (sscanf(env, "%255[^,],%ld,%d", path, &pid, &idx) != 3)
 | 
			
		||||
	if (sscanf(env, "%255[^,],%ld,%d", path, &pid, &id) != 3)
 | 
			
		||||
		return;
 | 
			
		||||
	environ_path = xstrdup(path);
 | 
			
		||||
	environ_pid = pid;
 | 
			
		||||
	environ_idx = idx;
 | 
			
		||||
	environ_session_id = id;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user