mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Print empty arguments properly.
This commit is contained in:
		| @@ -216,8 +216,10 @@ args_escape(const char *s) | |||||||
| 	char			*escaped, *result; | 	char			*escaped, *result; | ||||||
| 	int			 flags; | 	int			 flags; | ||||||
|  |  | ||||||
| 	if (*s == '\0') | 	if (*s == '\0') { | ||||||
| 		return (xstrdup(s)); | 		xasprintf(&result, "''"); | ||||||
|  | 		return (result); | ||||||
|  | 	} | ||||||
| 	if (s[0] != ' ' && | 	if (s[0] != ' ' && | ||||||
| 	    (strchr(quoted, s[0]) != NULL || s[0] == '~') && | 	    (strchr(quoted, s[0]) != NULL || s[0] == '~') && | ||||||
| 	    s[1] == '\0') { | 	    s[1] == '\0') { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm