Add support of /W prompts
 -Erik
diff --git a/cmdedit.c b/cmdedit.c
index e317b86..a371081 100644
--- a/cmdedit.c
+++ b/cmdedit.c
@@ -441,6 +441,19 @@
 				add_to_prompt(&prmt_mem_ptr, &alm, &prmt_len, pwd_buf);
 				continue;
 #endif	
+			case 'W':
+				if (pwd_buf[0] == 0) {
+					char *z;
+					
+					getcwd(pwd_buf, PATH_MAX);
+					z = strrchr(pwd_buf,'/');
+					if ( (z != NULL) && (z != pwd_buf) ) {
+						z++;
+						strcpy(pwd_buf,z);
+					}
+				}
+				add_to_prompt(&prmt_mem_ptr, &alm, &prmt_len, pwd_buf);
+				continue;
 			case '!':
 				snprintf(buf, sizeof(buf), "%d", num_ok_lines);
 				add_to_prompt(&prmt_mem_ptr, &alm, &prmt_len, buf);