emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Small shell-mode patch to handle auto-cd (e.g. shells like zsh)


From: Michael Albinus
Subject: Re: Small shell-mode patch to handle auto-cd (e.g. shells like zsh)
Date: Thu, 06 May 2021 10:10:06 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Jason Kim <jason.w.kim@icloud.com> writes:

Hi Jason,

> Hi, Please find enclosed a small patch against emacs-lisp (packaged
> with emacs 26.3 on recent emacsen on recent ubuntu (20.4.0.2 ?)

Thanks for this proposal. I don't use shell-process-cd myself, at least
not explicitly, but I have some few comments:

+(defvar shell-has-auto-cd nil
+  "if set to true, shell-mode assumes that a command that resolves to a 
directory
+is an implicit cd command. Useful for shells like zsh that has this feature.")

- The docstring must be a complete sentence in the first line, starting
  with a capital letter, and finishing with a period.  The separator
  between two sentences are newline or two (!) spaces. See the emacs
  documentation standards (info "(elisp) Documentation Tips")

- I suppose you want to let people change this. So it should be rather a
  defcustom but a defvar.

- The initial value could be more intelligent. Instead of using nil, you
  might check the used shell file name whether it matches, for example,
  "zsh$".

- Several different shells could be used in an Emacs session, depending
  where you run the shell, locally or on a remote host. So it might be
  problematic to have just one fixed global value.

> Thank you
> -Jason

Best regards, Michael.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]