.br
- regex to string: press '/' at empty filter prompt
.br
-- toggle case sensitivity: press '|' at empty filter prompt
+- toggle case sensitivity: press ':' at empty filter prompt
.Pp
Common regex use cases:
.Pp
# # export NNN_OPENER=nuke
# 2. Run nnn with the program option to indicate a CLI opener
# nnn -c
+# # The -c program option overrides config `NNN_USE_EDITOR`
# 3. nuke can use nnn plugins (e.g. mocplay is used for audio), $PATH is updated.
#
# Details:
#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)
-#define DPRINTF_D(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%d\n", x, __LINE__)
+#define DPRINTF_D(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%d\n", x)
#define DPRINTF_U(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%u\n", x)
#define DPRINTF_S(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%s\n", x)
#define DPRINTF_P(x) xprintf(DEBUG_FD, "ln " TOSTRING(__LINE__) ": " #x "=%p\n", x)
#define READLINE_MAX 128
#define FILTER '/'
#define RFILTER '\\'
+#define CASE ':'
#define MSGWAIT '$'
#define REGEX_MAX 48
#define BM_MAX 10
{
char info[REGEX_MAX];
- snprintf(info, REGEX_MAX - 1, " %s [/\\], %s [|]",
+ snprintf(info, REGEX_MAX - 1, " %s [/\\], %s [:]",
(cfg.regex ? "regex" : "str"),
((fnstrstr == &strcasestr) ? "ic" : "noic"));
printinfoln(info);
}
/* Toggle case-sensitivity */
- if (*ch == '|') {
+ if (*ch == CASE) {
fnstrstr = (fnstrstr == &strcasestr) ? &strstr : &strcasestr;
regflags ^= REG_ICASE;
showfilter(ln);