From 3cf92da6fa692656d64b70e510efcf4e3682f978 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 17 Oct 2019 12:55:25 +0200 Subject: [PATCH] Improve documentation of shell-command-prompt-show-cwd * doc/emacs/misc.texi (Single Shell): * lisp/simple.el (shell-command): Document 'shell-command-prompt-show-cwd'. (Bug#4987) --- doc/emacs/misc.texi | 5 +++++ lisp/simple.el | 2 ++ 2 files changed, 7 insertions(+) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 3bfb729dc78..63b65e779c6 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -787,6 +787,11 @@ A positive integer tells the shell to use that number of columns for command output. The default value is @code{nil} that means to use the same number of columns as provided by the shell. +@vindex shell-command-prompt-show-cwd + To make the above commands show the current directory in their +prompts, customize the variable @code{shell-command-prompt-show-cwd} +to a non-nil value. + @kindex M-| @findex shell-command-on-region @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!}, but diff --git a/lisp/simple.el b/lisp/simple.el index e44b877931b..cd674c36e7b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3508,6 +3508,8 @@ a shell (with its need to quote arguments)." With prefix argument, insert the COMMAND's output at point. Interactively, prompt for COMMAND in the minibuffer. +If `shell-command-prompt-show-cwd' is non-nil, show the current +directory in the prompt. If COMMAND ends in `&', execute it asynchronously. The output appears in the buffer `*Async Shell Command*'. -- 2.39.2