Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
c10828bd
Commit
c10828bd
authored
Feb 02, 2015
by
Michael Albinus
Browse files
* net/tramp-sh.el (tramp-histfile-override): Use t instead of `unset'.
parent
954ca0f0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
lisp/ChangeLog
lisp/ChangeLog
+2
-2
lisp/net/tramp-sh.el
lisp/net/tramp-sh.el
+9
-11
No files found.
lisp/ChangeLog
View file @
c10828bd
...
...
@@ -8,8 +8,8 @@
2015-02-02 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-sh.el (tramp-histfile-override): Add another choice
'unset.
Use it as default.
* net/tramp-sh.el (tramp-histfile-override): Add another choice
t.
Use it as default.
(tramp-open-shell, tramp-maybe-open-connection): Support it.
(Bug#19731)
...
...
lisp/net/tramp-sh.el
View file @
c10828bd
...
...
@@ -65,21 +65,20 @@ files conditionalize this setup based on the TERM environment variable."
:type 'string)
;;;###tramp-autoload
(defcustom tramp-histfile-override
'unse
t
(defcustom tramp-histfile-override t
"
When
invoking
a
shell,
override
the
HISTFILE
with
this
value.
By
default,
it
is
set
to
the
symbol
`
unset
',
which
unsets
any
setting
of
HISTFILE.
When
setting
to
a
string,
it
redirects
the
shell
history
to
that
file.
Be
careful
when
setting
to
\"/dev/null\"
; this might result in undesired results when using
\"bash\"
as
shell.
When
setting
to
a
string,
it
redirects
the
shell
history
to
that
file.
Be
careful
when
setting
to
\"/dev/null\"
; this might
result
in
undesired
results
when
using
\"bash\"
as
shell.
The
value
t
,
the
default
value,
unsets
any
setting
of
HISTFILE.
If
you
set
this
variable
to
nil
,
however,
the
*override*
is
disabled,
so
the
history
will
go
to
the
default
storage
location,
e.g.
\"$HOME/.sh_history\".
"
:group 'tramp
:version "
25.1
"
:type '(choice (const :tag "
Do
not
override
HISTFILE
" nil)
(const :tag "
Unset
HISTFILE
"
unse
t)
(const :tag "
Unset
HISTFILE
" t)
(string :tag "
Redirect
to
a
file
")))
;;;###tramp-autoload
...
...
@@ -3908,9 +3907,8 @@ file exists and nonzero exit status otherwise."
(
if
tramp-histfile-override
(
concat
"HISTFILE="
(
if
(
eq
tramp-histfile-override
'unset
)
""
(
tramp-shell-quote-argument
tramp-histfile-override
)))
(
if
(
stringp
tramp-histfile-override
)
(
tramp-shell-quote-argument
tramp-histfile-override
)
""
))
""
)
(
tramp-shell-quote-argument
tramp-end-of-output
)
shell
(
or
extra-args
""
))
...
...
@@ -4635,7 +4633,7 @@ connection if a previous connection has died for some reason."
(
setenv
"LC_ALL"
"en_US.utf8"
)
(
when
tramp-histfile-override
(
setenv
"HISTFILE"
(
and
(
not
(
eq
tramp-histfile-override
'unset
)
)
(
and
(
stringp
tramp-histfile-override
)
tramp-histfile-override
)))
(
setenv
"PROMPT_COMMAND"
)
(
setenv
"PS1"
tramp-initial-end-of-output
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment