Skip to content

Instantly share code, notes, and snippets.

@ryochin
Last active December 27, 2015 08:59
Show Gist options
  • Save ryochin/7300995 to your computer and use it in GitHub Desktop.
Save ryochin/7300995 to your computer and use it in GitHub Desktop.
homebrew: lv patch for --default-color-on option.
diff --git a/lv.1 b/lv.1
index 8a3222f..8868daf 100644
--- a/lv.1
+++ b/lv.1
@@ -189,8 +189,8 @@ corresponding code-points, in particular, Asian charsets.
.br
.IP "-a"
Adjust character set for search pattern (default)
-.IP "-c"
-Allow ANSI escape sequences for text decoration (Color)
+.IP "-C"
+Disallow ANSI escape sequences for text decoration (Color)
.IP "-d, -i"
Make regexp-searches ignore case (case folD search) (default)
.IP "-f"
diff --git a/src/conf.c b/src/conf.c
index 6378134..4381d48 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -121,7 +121,7 @@ private void ConfInitArgs( conf_t *conf )
no_scroll = TRUE; /* console.h */
allow_unify = FALSE; /* itable_t.h */
- allow_ansi_esc = FALSE; /* console.h */
+ allow_ansi_esc = TRUE; /* console.h */
line_number = FALSE; /* conv.h */
grep_inverted = FALSE; /* conv.h */
kana_conv = FALSE; /* kana.h */
@@ -281,7 +281,7 @@ private void ConfArg( conf_t *conf, byte **argv, byte *location )
case 'm': unimap_iso8859 = TRUE; s++; continue;
#endif /* MSDOS */
case 'a': adjust_charset = TRUE; s++; continue;
- case 'c': allow_ansi_esc = TRUE; s++; continue;
+ case 'C': allow_ansi_esc = FALSE; s++; continue;
case 'd': casefold_search = TRUE; s++; continue;
case 'i': casefold_search = TRUE; s++; continue;
case 'f': regexp_search = FALSE; s++; continue;
@@ -319,7 +319,7 @@ private void ConfArg( conf_t *conf, byte **argv, byte *location )
case 'm': unimap_iso8859 = FALSE; s++; continue;
#endif /* MSDOS */
case 'a': adjust_charset = FALSE; s++; continue;
- case 'c': allow_ansi_esc = FALSE; s++; continue;
+ case 'C': allow_ansi_esc = TRUE; s++; continue;
case 'd': casefold_search = FALSE; s++; continue;
case 'i': casefold_search = FALSE; s++; continue;
case 'f': regexp_search = TRUE; s++; continue;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment