From 8ae3c7aed92842f5988671c1b3350c65c58857e0 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 11 Jan 2017 09:09:37 -0500 Subject: Add a space in before export command to avoid polluting HISTFILE When `with-editor-export-editor` is added to `shell-mode-hook` the export command is needlessly added to $HISTFILE, adding a space character before the command doesn't save the command in the history list. This works given that usually most of Linux distributions usually ship with HISTCONTROL=ignoreboth. --- with-editor.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/with-editor.el b/with-editor.el index 546c119..40a8363 100644 --- a/with-editor.el +++ b/with-editor.el @@ -566,7 +566,7 @@ This works in `shell-mode', `term-mode' and `eshell-mode'." (filter (process-filter process))) (goto-char (process-mark process)) (process-send-string - process (format "export %s=%s\n" envvar + process (format " export %s=%s\n" envvar (shell-quote-argument with-editor-sleeping-editor))) (while (accept-process-output process 0.1)) (set-process-filter process filter) -- cgit v1.0