From 8f24ffaaef005b6d8e95b312fa575559d503be81 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 16 Aug 2020 08:17:03 +0200 Subject: [PATCH] options: add --minibar and -_ for activating basic state-information bar --- src/nano.c | 7 ++++++- src/rcfile.c | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/nano.c b/src/nano.c index 41f85c99..51df8115 100644 --- a/src/nano.c +++ b/src/nano.c @@ -641,6 +641,7 @@ void usage(void) print_opt("-z", "--suspendable", N_("Enable suspension")); #ifndef NANO_TINY print_opt("-%", "--stateflags", N_("Show some states on the title bar")); + print_opt("-_", "--minibar", N_("Show bar at bottom with some state info")); #endif #ifdef HAVE_LIBMAGIC print_opt("-!", "--magic", N_("Also try magic to determine syntax")); @@ -1744,6 +1745,7 @@ int main(int argc, char **argv) {"wordbounds", 0, NULL, 'W'}, {"wordchars", 1, NULL, 'X'}, {"zap", 0, NULL, 'Z'}, + {"minibar", 0, NULL, '_'}, {"atblanks", 0, NULL, 'a'}, {"emptyline", 0, NULL, 'e'}, {"autoindent", 0, NULL, 'i'}, @@ -1808,7 +1810,7 @@ int main(int argc, char **argv) SET(RESTRICTED); while ((optchr = getopt_long(argc, argv, "ABC:DEFGHIJ:KLMNOPQ:RST:UVWX:Y:Z" - "abcdef:ghijklmno:pqr:s:tuvwxyz$%!", long_options, NULL)) != -1) { + "abcdef:ghijklmno:pqr:s:tuvwxyz$_%!", long_options, NULL)) != -1) { switch (optchr) { #ifndef NANO_TINY case 'A': @@ -1928,6 +1930,9 @@ int main(int argc, char **argv) case 'Z': SET(LET_THEM_ZAP); break; + case '_': + SET(MINIBAR); + break; case 'a': SET(AT_BLANKS); break; diff --git a/src/rcfile.c b/src/rcfile.c index ef410369..d14d9994 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -110,6 +110,7 @@ static const rcoption rcopts[] = { {"jumpyscrolling", JUMPY_SCROLLING}, {"locking", LOCKING}, {"matchbrackets", 0}, + {"minibar", MINIBAR}, {"noconvert", NO_CONVERT}, {"showcursor", SHOW_CURSOR}, {"smarthome", SMART_HOME},