shithub: neatroff

Download patch

ref: a7cb7b9b9f178c916713036a1248820336ca104b
parent: 43b46fe48345634c85a5f432a802d330c549b6b7
author: Ali Gholami Rudi <ali@rudi.ir>
date: Fri Aug 8 13:37:12 EDT 2014

reg: \n[.ev] for the current environment name

--- a/reg.c
+++ b/reg.c
@@ -90,6 +90,8 @@
 	}
 	if (s[0] == '.' && !strcmp(".neat", s))
 		return "1";
+	if (s[0] == '.' && s[1] == 'e' && s[2] == 'v' && !s[3])
+		return map_name(env_id);
 	if (s[0] == '$' && s[1] == '$' && !s[2]) {
 		sprintf(numbuf, "%d", getpid());
 		return numbuf;