Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically running the .bashrc commands on remote servers #25

Open
quotuva opened this issue Dec 19, 2023 · 1 comment
Open

Automatically running the .bashrc commands on remote servers #25

quotuva opened this issue Dec 19, 2023 · 1 comment

Comments

@quotuva
Copy link
Contributor

quotuva commented Dec 19, 2023

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?

@CeleritasCelery
Copy link
Owner

That seems like a good way to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants