shithub: neatroff

Download patch

ref: 16a3d86bab480417e25b29efe903e8a8f7a12585
parent: 2af39358346695de1ec8b5a4320da9a345016c70
author: Ali Gholami Rudi <[email protected]>
date: Fri May 16 09:14:09 EDT 2014

ren: replace \e with the current escape character

--- a/ren.c
+++ b/ren.c
@@ -726,15 +726,16 @@
 			}
 			return;
 		}
-		if (strchr(" bCcDdfHhkLlmNoprSsuvXxz0^|{}&/,", c[1])) {
+		if (strchr(" bCcDdefHhkLlmNoprSsuvXxz0^|{}&/,", c[1])) {
 			argnext(arg, c[1], next, back);
-			if (c[1] == 'S' || c[1] == 'H')
-				return;			/* not implemented */
-			if (c[1] != 'N') {
+			if (c[1] == 'e') {
+				snprintf(c, GNLEN, "%c%c", c_ec, c_ec);
+			} else if (c[1] == 'N') {
+				snprintf(c, GNLEN, "GID=%s", arg);
+			} else {
 				ren_cmd(wb, c[1], arg);
 				return;
 			}
-			snprintf(c, GNLEN, "GID=%s", arg);
 		}
 	}
 	if (!ren_div && cdef_map(c, n_f)) {		/* .char characters */