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'))
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'))
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).
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).