Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.
0 votes
in vifm by

What am I doing wrong with this command? It is supposed to cd into the directory that user enters (simple version of fzf).

command! mCD :execute 'cd' fnameescape(term('read varname && echo $varname'))

1 Answer

+1 vote
by
selected by
 
Best answer

Without interactive shell terminal just isn't in a state for input by default, need to change it before read:

command! mCD :execute 'cd' fnameescape(term('stty echo cooked && read varname && echo $varname'))
by

Can this somehow be shown in tmux split? I enabled use of tmux using screen, but this is still showing up in subshell (ctrl-d to get out of it).

by

No, running a command in a terminal multiplexer is asynchronous and output of such command can't be captured and waited for (well, at least without creating a wrapper and interacting with it somehow).

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here is acceptable, but this is not a perfect place for them.

Support Ukraine
...