mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Replace ## by # in format.
This commit is contained in:
		
							
								
								
									
										7
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										7
									
								
								format.c
									
									
									
									
									
								
							@@ -321,6 +321,13 @@ format_expand(struct format_tree *ft, const char *fmt)
 | 
				
			|||||||
				break;
 | 
									break;
 | 
				
			||||||
			fmt += n + 1;
 | 
								fmt += n + 1;
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
 | 
							case '#':
 | 
				
			||||||
 | 
								while (len - off < 2) {
 | 
				
			||||||
 | 
									buf = xrealloc(buf, 2, len);
 | 
				
			||||||
 | 
									len *= 2;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								buf[off++] = '#';
 | 
				
			||||||
 | 
								continue;
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			s = NULL;
 | 
								s = NULL;
 | 
				
			||||||
			if (ch >= 'A' && ch <= 'Z')
 | 
								if (ch >= 'A' && ch <= 'Z')
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								tmux.1
									
									
									
									
									
								
							@@ -3011,6 +3011,9 @@ for example
 | 
				
			|||||||
.Ql #{session_name} .
 | 
					.Ql #{session_name} .
 | 
				
			||||||
Some variables also have an shorter alias such as
 | 
					Some variables also have an shorter alias such as
 | 
				
			||||||
.Ql #S .
 | 
					.Ql #S .
 | 
				
			||||||
 | 
					.Ql ##
 | 
				
			||||||
 | 
					is replaced by a single
 | 
				
			||||||
 | 
					.Ql # .
 | 
				
			||||||
Conditionals are also accepted by prefixing with
 | 
					Conditionals are also accepted by prefixing with
 | 
				
			||||||
.Ql \&?
 | 
					.Ql \&?
 | 
				
			||||||
and separating two alternatives with a comma;
 | 
					and separating two alternatives with a comma;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user