[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/detached 640ad8a8dd 07/22: Remove the need for detached
From: |
ELPA Syncer |
Subject: |
[elpa] externals/detached 640ad8a8dd 07/22: Remove the need for detached-shell-history-file |
Date: |
Mon, 30 May 2022 10:57:30 -0400 (EDT) |
branch: externals/detached
commit 640ad8a8ddcd1cdc841a2dda197bbc7fe2c6c202
Author: Niklas Eklund <niklas.eklund@posteo.net>
Commit: Niklas Eklund <niklas.eklund@posteo.net>
Remove the need for detached-shell-history-file
---
detached-shell.el | 19 +++++--------------
detached.el | 2 --
2 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/detached-shell.el b/detached-shell.el
index 62a420a450..fc4864051c 100644
--- a/detached-shell.el
+++ b/detached-shell.el
@@ -37,11 +37,6 @@
:group 'detached
:type 'plist)
-(defcustom detached-shell-history-file nil
- "File to store history."
- :type 'string
- :group 'detached)
-
;;;; Functions
(defun detached-shell-select-session ()
@@ -109,13 +104,13 @@ cluttering the comint-history with dtach commands."
(let* ((history-file (cond ((string= shell--start-prog "bash")
"~/.bash_history")
((string= shell--start-prog "ksh")
"~/.sh_history")
((string= shell--start-prog "zsh")
"~/.zsh_history")
- (t nil)))
- (comint-input-ring-file-name
+ (t nil))))
+ (setq comint-input-ring-file-name
(if history-file
(concat
(file-remote-p default-directory)
history-file)
- comint-input-ring-file-name)))
+ comint-input-ring-file-name))
(apply orig-fun args)
(advice-remove 'comint-read-input-ring
#'detached-shell--comint-read-input-ring-advice))))
@@ -123,16 +118,12 @@ cluttering the comint-history with dtach commands."
"Save `shell' history."
(with-connection-local-variables
(unless (string-prefix-p detached--shell-command-buffer (buffer-name))
- (let* ((inhibit-message t)
- (comint-input-ring-file-name
- (concat
- (file-remote-p default-directory)
- detached-shell-history-file)))
+ (let* ((inhibit-message t))
(comint-write-input-ring)))))
;;;###autoload
(defun detached-shell-override-history (orig-fun &rest args)
- "Override history to read `detached-shell-history-file' in ORIG-FUN with
ARGS.
+ "Override history in ORIG-FUN with ARGS.
This function also makes sure that the HISTFILE is disabled for local shells."
(cl-letf (((getenv "HISTFILE") ""))
diff --git a/detached.el b/detached.el
index f225c48896..045ee462f0 100644
--- a/detached.el
+++ b/detached.el
@@ -184,8 +184,6 @@ Valid values are: create, new and attach")
"Variable to specify the origin of the session.")
(defvar detached-session-action nil
"A property list of actions for a session.")
-;; TODO Consider removing `detached-shell-command-history' if the new
-;; history override solution works.
(defvar detached-shell-command-history nil
"History of commands run with `detached-shell-command'.")
(defvar detached-local-session nil
- [elpa] externals/detached updated (f08110df57 -> bae90a13dd), ELPA Syncer, 2022/05/30
- [elpa] externals/detached 640ad8a8dd 07/22: Remove the need for detached-shell-history-file,
ELPA Syncer <=
- [elpa] externals/detached 98b80a487c 06/22: Update detached failure message, ELPA Syncer, 2022/05/30
- [elpa] externals/detached 6f825c56e7 10/22: Fix read-only error, ELPA Syncer, 2022/05/30
- [elpa] externals/detached 1b99b04fd2 02/22: Remove comment in detached-env, ELPA Syncer, 2022/05/30
- [elpa] externals/detached 0e40156cf5 03/22: Move eterm-color into detached.el, ELPA Syncer, 2022/05/30
- [elpa] externals/detached 10220f8663 01/22: Move detached-env mode into detached.el, ELPA Syncer, 2022/05/30
- [elpa] externals/detached e55cf27103 14/22: Remove detached-env file, ELPA Syncer, 2022/05/30
- [elpa] externals/detached 200da6a619 08/22: Fix broken tests, ELPA Syncer, 2022/05/30
- [elpa] externals/detached f3ee65f6c9 15/22: Rename env-mode to env, ELPA Syncer, 2022/05/30
- [elpa] externals/detached 532f2030c2 16/22: Update broken test, ELPA Syncer, 2022/05/30
- [elpa] externals/detached bae90a13dd 22/22: Remove unnecessary with-connection-local-variables, ELPA Syncer, 2022/05/30