From c46b0baa089608a16ab9ac71a2d8dfeea92422f0 Mon Sep 17 00:00:00 2001 From: Kévin Le Gouguec Date: Sat, 27 Nov 2021 23:19:20 +0100 Subject: Expand on shell-mode itch --- itches/emacs/interpreters.org | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/itches/emacs/interpreters.org b/itches/emacs/interpreters.org index 6174ea1..df1cea0 100644 --- a/itches/emacs/interpreters.org +++ b/itches/emacs/interpreters.org @@ -1,6 +1,27 @@ * Shell ** Add faces instead of reusing font-lock-{comment,string}. -** Understand ~autocd~ and ~cd !$~. +** Improve directory tracking. +Ensure ~default-directory~ remains consistent with the shell's current +working directory. Some things ~shell-mode~ does not handle: + +- ~autocd~ (there's ~shell-has-auto-cd~, but it does not track whether + ~autocd~ is *actually* set) +- ~cd !$~ +- ~ssh~ +- Docker containers + +Some solutions: +- Emacs 28's ~comint-osc-process-output~ + - requires configuring the prompt + - does not handle SSH (yet) + - relies on OSC 7, which is [[https://gitlab.freedesktop.org/terminal-wg/specifications/-/issues/20][not standard yet]] +- running this clumsy thing after every command: + #+begin_src sh + (file-truename + (format "/proc/%d/cwd" + (process-id (get-buffer-process (current-buffer))))) + #+end_src + ** Use Bash completions. E.g. in most terminals, typing ~ls TAB~ in a folder with a single file expands to ~ls that-file~. -- cgit v1.2.3