Skip to content

Commit

Permalink
fix(multi-vterm): change work dir correctly on remote dedicated terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Jan 5, 2024
1 parent 72db594 commit aed3220
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions modules/me-tools.el
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@
:custom
(multi-vterm-dedicated-window-height-percent 30)
:config
;; If a dedicated terminal is run on a remote machine, it seems that
;; `multi-vterm' don't get the working directory right, lets fix it!
(advice-add
'multi-vterm-dedicated-open :after
(defun +multi-vterm--remote-change-working-directory-a (&rest _)
(if-let ((dir (file-remote-p default-directory 'localname)))
(vterm-send-string (format "cd %S\n" dir)))))
(+nvmap!
:keymaps 'vterm-mode-map
",c" #'multi-vterm
Expand Down

0 comments on commit aed3220

Please sign in to comment.