This is useful for situations where the executable is compiled with
readline support but the user wants to use the native prompt. Often
this happens because packagers build without readline disabled.
uint_t trash : 2; /* Trash method 0: rm -rf, 1: trash-cli, 2: gio trash */
uint_t uidgid : 1; /* Show owner and group info */
uint_t usebsdtar : 1; /* Use bsdtar as default archive utility */
uint_t trash : 2; /* Trash method 0: rm -rf, 1: trash-cli, 2: gio trash */
uint_t uidgid : 1; /* Show owner and group info */
uint_t usebsdtar : 1; /* Use bsdtar as default archive utility */
- uint_t reserved : 5; /* Adjust when adding/removing a field */
+ uint_t xprompt : 1; /* Use native prompt instead of readline prompt */
+ uint_t reserved : 4; /* Adjust when adding/removing a field */
} runstate;
/* Contexts or workspaces */
} runstate;
/* Contexts or workspaces */
+ if (g_state.picker || g_state.xprompt) {
#endif
cmdline = xreadline(NULL, PROMPT);
#ifndef NORL
#endif
cmdline = xreadline(NULL, PROMPT);
#ifndef NORL
break;
case SEL_OPENWITH:
#ifndef NORL
break;
case SEL_OPENWITH:
#ifndef NORL
+ if (g_state.picker || g_state.xprompt) {
#endif
tmp = xreadline(NULL, messages[MSG_OPEN_WITH]);
#ifndef NORL
#endif
tmp = xreadline(NULL, messages[MSG_OPEN_WITH]);
#ifndef NORL
" -K detect key collision and exit\n"
" -l val set scroll lines\n"
" -n type-to-nav mode\n"
" -K detect key collision and exit\n"
" -l val set scroll lines\n"
" -n type-to-nav mode\n"
+#ifndef NORL
+ " -N use native prompt\n"
+#endif
" -o open files only on Enter\n"
" -p file selection file [-:stdout]\n"
" -P key run plugin key\n"
" -o open files only on Enter\n"
" -p file selection file [-:stdout]\n"
" -P key run plugin key\n"
while ((opt = (env_opts_id > 0
? env_opts[--env_opts_id]
while ((opt = (env_opts_id > 0
? env_opts[--env_opts_id]
- : getopt(argc, argv, "aAb:BcCdDeEfF:gHiJKl:nop:P:QrRs:St:T:uUVxh"))) != -1) {
+ : getopt(argc, argv, "aAb:BcCdDeEfF:gHiJKl:nNop:P:QrRs:St:T:uUVxh"))) != -1) {
switch (opt) {
#ifndef NOFIFO
case 'a':
switch (opt) {
#ifndef NOFIFO
case 'a':
case 'n':
cfg.filtermode = 1;
break;
case 'n':
cfg.filtermode = 1;
break;
+#ifndef NORL
+ case 'N':
+ g_state.xprompt = 1;
+ break;
+#endif
case 'o':
cfg.nonavopen = 1;
break;
case 'o':
cfg.nonavopen = 1;
break;
exitcurses();
#ifndef NORL
exitcurses();
#ifndef NORL
+ if (rlhist && !g_state.xprompt) {
mkpath(cfgpath, ".history", g_buf);
write_history(g_buf);
}
mkpath(cfgpath, ".history", g_buf);
write_history(g_buf);
}