complete -c nnn -s A -d 'disable dir auto-select'
complete -c nnn -s b -r -d 'bookmark key to open' -x -a '(echo $NNN_BMS | awk -F: -v RS=\; \'{print $1"\t"$2}\')'
complete -c nnn -s c -d 'cli-only opener'
-complete -c nnn -s C -d 'disable color'
complete -c nnn -s d -d 'start in detail mode'
complete -c nnn -s e -d 'open text files in $VISUAL/$EDITOR/vi'
complete -c nnn -s E -d 'use EDITOR for undetached edits'
'(-A)-A[disable dir auto-select]'
'(-b)-b[bookmark key to open]:key char'
'(-c)-c[cli-only opener]'
- '(-C)-C[disable color]'
'(-d)-d[start in detail mode]'
'(-e)-e[open text files in $VISUAL/$EDITOR/vi]'
'(-E)-E[use EDITOR for undetached edits]'
#define STATE_TRASH 0x40
#define STATE_FORCEQUIT 0x80
#define STATE_FORTUNE 0x100
-#define STATE_NOCOLOR 0x200
static uint g_states;
/* Initialize curses mode */
static bool initcurses(void *oldmask)
{
- short i;
- char *colors = xgetenv(env_cfg[NNN_COLORS], "4444");
-
#ifdef NOMOUSE
(void) oldmask;
#endif
#endif
curs_set(FALSE); /* Hide cursor */
- if (!(g_states & STATE_NOCOLOR || getenv("NO_COLOR"))) {
+ if (!getenv("NO_COLOR")) {
+ short i;
+ char *colors = xgetenv(env_cfg[NNN_COLORS], "4444");
+
start_color();
use_default_colors();
" -A no dir auto-select\n"
" -b key open bookmark key\n"
" -c cli-only opener (overrides -e)\n"
- " -C disable color\n"
" -d detail mode\n"
" -e text in $VISUAL/$EDITOR/vi\n"
" -E use EDITOR for undetached edits\n"
while ((opt = (env_opts_id > 0
? env_opts[--env_opts_id]
- : getopt(argc, argv, "Ab:cCdeEfFgHKnop:QrRs:St:T:Vxh"))) != -1) {
+ : getopt(argc, argv, "Ab:cdeEfFgHKnop:QrRs:St:T:Vxh"))) != -1) {
switch (opt) {
case 'A':
cfg.autoselect = 0;
case 'c':
cfg.cliopener = 1;
break;
- case 'C':
- g_states |= STATE_NOCOLOR;
- break;
case 'S':
cfg.blkorder = 1;
nftw_fn = sum_bsize;