mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-03 16:46:18 +00:00 
			
		
		
		
	Do not expand the file given with -f so it can contain :s.
This commit is contained in:
		
							
								
								
									
										11
									
								
								tmux.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								tmux.c
									
									
									
									
									
								
							@@ -338,7 +338,7 @@ main(int argc, char **argv)
 | 
				
			|||||||
	char					*path = NULL, *label = NULL;
 | 
						char					*path = NULL, *label = NULL;
 | 
				
			||||||
	char					*cause, **var;
 | 
						char					*cause, **var;
 | 
				
			||||||
	const char				*s, *cwd;
 | 
						const char				*s, *cwd;
 | 
				
			||||||
	int					 opt, keys, feat = 0;
 | 
						int					 opt, keys, feat = 0, fflag = 0;
 | 
				
			||||||
	uint64_t				 flags = 0;
 | 
						uint64_t				 flags = 0;
 | 
				
			||||||
	const struct options_table_entry	*oe;
 | 
						const struct options_table_entry	*oe;
 | 
				
			||||||
	u_int					 i;
 | 
						u_int					 i;
 | 
				
			||||||
@@ -383,10 +383,15 @@ main(int argc, char **argv)
 | 
				
			|||||||
				flags |= CLIENT_CONTROL;
 | 
									flags |= CLIENT_CONTROL;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case 'f':
 | 
							case 'f':
 | 
				
			||||||
 | 
								if (!fflag) {
 | 
				
			||||||
 | 
									fflag = 1;
 | 
				
			||||||
				for (i = 0; i < cfg_nfiles; i++)
 | 
									for (i = 0; i < cfg_nfiles; i++)
 | 
				
			||||||
					free(cfg_files[i]);
 | 
										free(cfg_files[i]);
 | 
				
			||||||
			free(cfg_files);
 | 
									cfg_nfiles = 0;
 | 
				
			||||||
			expand_paths(optarg, &cfg_files, &cfg_nfiles, 0);
 | 
								}
 | 
				
			||||||
 | 
								cfg_files = xreallocarray(cfg_files, cfg_nfiles + 1,
 | 
				
			||||||
 | 
								    sizeof *cfg_files);
 | 
				
			||||||
 | 
								cfg_files[cfg_nfiles++] = xstrdup(optarg);
 | 
				
			||||||
			cfg_quiet = 0;
 | 
								cfg_quiet = 0;
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 		case 'V':
 | 
					 		case 'V':
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user