emacs-native-shell-complete
emacs-native-shell-complete copied to clipboard
Automatically running the .bashrc commands on remote servers
I use the following hack in shell-mode-hook
:
(lambda nil
(when (file-remote-p default-directory)
(let* ((proc (get-buffer-process (current-buffer))))
(accept-process-output proc)
(delete-line)
(process-send-string
proc "export HISTCONTROL=ignoreboth; bind 'set enable-bracketed-paste off'; history -d $(history 1)\n")))
...)
to do this (and to avoid an annoying double prompt display).
Is there a better way?
That seems like a good way to do it.