|
|
|
|
|
by Rediscover
875 days ago
|
|
Probably not the answer You are looking for... Try some variant of this in your remote .bash_profile or what-not: if [ "$PS1" ]; then
export PS1='\h:\w\$ '
if [[ "x${TERM}" = "xeterm" || "x${TERM}" = "xeterm-color" ]]; then
function set-eterm-dir {
echo -e "\033AnSiTu" $(whoami)
echo -e "\033AnSiTc" $(pwd)
echo -e "\033AnSiTh" $(hostname -f)
}
PROMPT_COMMAND=set-eterm-dir
fi
fi
Now, locally, invoke M-x ansi-term, then within the ansi-term ssh to the remote machine. Change dirs, hit C-x C-f to open a file in the current (remote) directory.See also the ansi-term hints on emacswiki https://www.emacswiki.org/emacs/AnsiTermHints#h5o-5 or the comments in /usr/local/share/emacs/*/lisp/term.el Edit: formatting |
|
db48x has a great answer below.