misc/auto-completion/bash/nnn-completion.bash | 1 - misc/auto-completion/fish/nnn.fish | 1 - misc/auto-completion/zsh/_nnn | 1 - nnn.1 | 4 ---- src/nnn.c | 27 +++++---------------------- diff --git a/misc/auto-completion/bash/nnn-completion.bash b/misc/auto-completion/bash/nnn-completion.bash index cb2b6f28e61bed0d4197544aeeef5a52f378ae28..88401248710f81150de465ed8321b310368206fe 100644 --- a/misc/auto-completion/bash/nnn-completion.bash +++ b/misc/auto-completion/bash/nnn-completion.bash @@ -39,7 +39,6 @@ -s -S -t -T - -u -U -V -w diff --git a/misc/auto-completion/fish/nnn.fish b/misc/auto-completion/fish/nnn.fish index fdd27f899fd3a9d921b4bb50824ef48c94521375..f3093e6c90a0c088e3452c6ce85d4bc4412fdb10 100644 --- a/misc/auto-completion/fish/nnn.fish +++ b/misc/auto-completion/fish/nnn.fish @@ -38,7 +38,6 @@ complete -c nnn -s s -r -d 'load session by name' -x -a '@\t"last session" (ls $sessions_dir)' complete -c nnn -s S -d 'persistent session' complete -c nnn -s t -r -d 'timeout in seconds to lock' complete -c nnn -s T -r -d 'a d e r s t v' -complete -c nnn -s u -d 'use selection (no prompt)' complete -c nnn -s U -d 'show user and group' complete -c nnn -s V -d 'show program version and exit' complete -c nnn -s w -d 'hardware cursor mode' diff --git a/misc/auto-completion/zsh/_nnn b/misc/auto-completion/zsh/_nnn index 9a33020c22b132119602e8b9e5c6ffb8252e5a20..44341fe2a97af253ebefc910b7622de69d8621bc 100644 --- a/misc/auto-completion/zsh/_nnn +++ b/misc/auto-completion/zsh/_nnn @@ -36,7 +36,6 @@ '(-s)-s[load session]:session name' '(-S)-S[persistent session]' '(-t)-t[timeout to lock]:seconds' '(-T)-T[a d e r s t v]:key' - '(-u)-u[use selection (no prompt)]' '(-U)-U[show user and group]' '(-V)-V[show program version and exit]' '(-w)-C[hardware cursor mode]' diff --git a/nnn.1 b/nnn.1 index 1a752fa77ee283c0105ecaa6d43d18e6b00ab497..e07709be5240a9155598ecf78b55d3272f8e9c60 100644 --- a/nnn.1 +++ b/nnn.1 @@ -32,7 +32,6 @@ .Op Ar -s name .Op Ar -S .Op Ar -t secs .Op Ar -T key -.Op Ar -u .Op Ar -U .Op Ar -V .Op Ar -w @@ -144,9 +143,6 @@ .Pp .Fl "T key" sort order keys: 'a'u / 'd'u / 'e'xtension / 'r'everse / 's'ize / 't'ime / 'v'ersion -.Pp -.Fl u - use selection if available, don't prompt to choose between selection and hovered entry .Pp .Fl U show user and group names in status bar diff --git a/src/nnn.c b/src/nnn.c index 8edb2a2afa3c75ff1fad078d381f92a65c5aa937..e4f78df36d1e7ecb591b7b5321188a039d6917c1 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -294,8 +294,7 @@ uint_t version : 1; /* Version sort */ uint_t reserved1 : 1; /* The following settings are global */ uint_t curctx : 3; /* Current context number */ - uint_t prefersel : 1; /* Prefer selection over current, if exists */ - uint_t reserved2 : 1; + uint_t reserved2 : 2; uint_t nonavopen : 1; /* Open file on right arrow or `l` */ uint_t autoselect : 1; /* Auto-select dir in type-to-nav mode */ uint_t cursormode : 1; /* Move hardware cursor with selection */ @@ -372,7 +371,6 @@ 0, /* reverse */ 0, /* version */ 0, /* reserved1 */ 0, /* curctx */ - 0, /* prefersel */ 0, /* reserved2 */ 0, /* nonavopen */ 1, /* autoselect */ @@ -525,7 +523,7 @@ #define MSG_CANCEL 4 #define MSG_FAILED 5 #define MSG_SSN_NAME 6 #define MSG_CP_MV_AS 7 -#define MSG_CUR_SEL_OPTS 8 +#define MSG_NOCHNAGE 8 #define MSG_FORCE_RM 9 #define MSG_LIMIT 10 #define MSG_NEW_OPTS 11 @@ -558,9 +556,8 @@ #define MSG_ORDER 37 #define MSG_LAZY 38 #define MSG_FIRST 39 #define MSG_RM_TMP 40 -#define MSG_NOCHNAGE 41 #ifndef DIR_LIMITED_SELECTION -#define MSG_DIR_CHANGED 42 /* Must be the last entry */ +#define MSG_DIR_CHANGED 41 /* Must be the last entry */ #endif static const char * const messages[] = { @@ -572,7 +569,7 @@ "cancelled", "failed!", "session name: ", "'c'p / 'm'v as?", - "'c'urrent / 's'el?", + "unchanged", "rm -rf %s file%s? [Esc cancels]", "limit exceeded", "'f'ile / 'd'ir / 's'ym / 'h'ard?", @@ -605,7 +602,6 @@ "'a'u / 'd'u / 'e'xtn / 'r'ev / 's'ize / 't'ime / 'v'er / 'c'lr / '^T' (cycle)?", "unmount failed! try lazy?", "first file (\')/char?", "remove tmp file?", - "unchanged", #ifndef DIR_LIMITED_SELECTION "dir changed, range sel off", /* Must be the last entry */ #endif @@ -1223,15 +1219,6 @@ } static int get_cur_or_sel(void) { - if (selbufpos && ndents) { - if (cfg.prefersel) - return 's'; - - int choice = get_input(messages[MSG_CUR_SEL_OPTS]); - - return ((choice == 'c' || choice == 's') ? choice : 0); - } - if (selbufpos) return 's'; @@ -7428,7 +7415,6 @@ " -S persistent session\n" #endif " -t secs timeout to lock\n" " -T key sort order [a/d/e/r/s/t/v]\n" - " -u use selection (no prompt)\n" #ifndef NOUG " -U show user and group\n" #endif @@ -7585,7 +7571,7 @@ #endif while ((opt = (env_opts_id > 0 ? env_opts[--env_opts_id] - : getopt(argc, argv, "aAb:cCdDeEfFgHJKl:nop:P:QrRs:St:T:uUVwxh"))) != -1) { + : getopt(argc, argv, "aAb:cCdDeEfFgHJKl:nop:P:QrRs:St:T:UVwxh"))) != -1) { switch (opt) { #ifndef NOFIFO case 'a': @@ -7700,9 +7686,6 @@ break; case 'T': if (env_opts_id < 0) sort = (uchar_t)optarg[0]; - break; - case 'u': - cfg.prefersel = 1; break; case 'U': g_state.uidgid = 1;