mirror of
https://github.com/vale981/py-vterm-interaction.el
synced 2025-03-05 10:01:41 -05:00
use a pure python way to cd
This commit is contained in:
parent
a7a603c24d
commit
bf20984058
1 changed files with 1 additions and 1 deletions
|
@ -339,7 +339,7 @@ This is equivalent to running `%run <buffer-file-name>` in the python vterm buff
|
||||||
(interactive)
|
(interactive)
|
||||||
(if buffer-file-name
|
(if buffer-file-name
|
||||||
(let ((buffer-directory (file-name-directory buffer-file-name)))
|
(let ((buffer-directory (file-name-directory buffer-file-name)))
|
||||||
(python-vterm-paste-string (format "%%cd \"%s\"\n" buffer-directory))
|
(python-vterm-paste-string (format "import os; os.chdir(\"%s\")" buffer-directory))
|
||||||
(with-current-buffer (python-vterm-fellow-repl-buffer)
|
(with-current-buffer (python-vterm-fellow-repl-buffer)
|
||||||
(setq default-directory buffer-directory)))
|
(setq default-directory buffer-directory)))
|
||||||
(message "The buffer is not associated with a directory.")))
|
(message "The buffer is not associated with a directory.")))
|
||||||
|
|
Loading…
Add table
Reference in a new issue