GNU bug report logs - #35769
Local .bash_history cleared when tramp-histfile-override is set to t

Previous Next

Package: emacs;

Reported by: Wanrong Lin <wrglin <at> gmail.com>

Date: Fri, 17 May 2019 01:18:02 UTC

Severity: normal

Full log


View this message in rfc822 format

From: Tom Gillespie <tgbugs <at> gmail.com>
To: 35769 <at> debbugs.gnu.org
Subject: bug#35769: issue persists for su, sudo, chained ssh connections
Date: Fri, 27 May 2022 15:56:25 -0700
This bug has not been resolved for /su:, /sudo:, and chained
/ssh: connections as of emacs 28.1 tramp 2.5.2.28.1, and
emacs 29 tramp 2.6-pre.

The examples below WILL TRUNCATE YOUR HISTFILE!
So if you are going to run them back it up first!
#+begin_src elisp
;; XXX BACK UP YOUR .bash_history (or similar) BEFORE RUNNING
;; XXX IT WILL BE TRUNCATED

;; in a fresh emacs -Q -no-site-file
(require 'tramp-sh)
(let ((tramp-histfile-override t))
  (file-directory-p "/su::.emacs.d"))

;; in a fresh emacs -Q -no-site-file
(require 'tramp-sh)
(let ((tramp-histfile-override t))
  (file-directory-p "/ssh:|su::.emacs.d"))

;; in a fresh emacs -Q -no-site-file
(require 'tramp-sh)
(let ((tramp-histfile-override t))
  ;; change host1 and host2 to hosts that you can access sequentially
  (file-directory-p "/ssh:host1|ssh:host2:.emacs.d"))
#+end_src




This bug report was last modified 3 years and 90 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.