diff options
| author | Michael Albinus | 2015-02-02 20:47:31 +0100 |
|---|---|---|
| committer | Michael Albinus | 2015-02-02 20:47:31 +0100 |
| commit | c10828bd8520db83cc06a2ad5de6f8a1ad74b83c (patch) | |
| tree | 12268bb1d508db337ad98ec1aa34cebcb788acf7 | |
| parent | 954ca0f017f62f52ee679f2aa68effb20c917278 (diff) | |
| download | emacs-c10828bd8520db83cc06a2ad5de6f8a1ad74b83c.tar.gz emacs-c10828bd8520db83cc06a2ad5de6f8a1ad74b83c.zip | |
* net/tramp-sh.el (tramp-histfile-override): Use t instead of `unset'.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 20 |
2 files changed, 11 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6e5b078f94d..77361bc3a01 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | 2015-02-02 Michael Albinus <michael.albinus@gmx.de> | 9 | 2015-02-02 Michael Albinus <michael.albinus@gmx.de> |
| 10 | 10 | ||
| 11 | * net/tramp-sh.el (tramp-histfile-override): Add another choice | 11 | * net/tramp-sh.el (tramp-histfile-override): Add another choice t. |
| 12 | 'unset. Use it as default. | 12 | Use it as default. |
| 13 | (tramp-open-shell, tramp-maybe-open-connection): Support it. | 13 | (tramp-open-shell, tramp-maybe-open-connection): Support it. |
| 14 | (Bug#19731) | 14 | (Bug#19731) |
| 15 | 15 | ||
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 20e32e9df6b..8e519b13e5f 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -65,21 +65,20 @@ files conditionalize this setup based on the TERM environment variable." | |||
| 65 | :type 'string) | 65 | :type 'string) |
| 66 | 66 | ||
| 67 | ;;;###tramp-autoload | 67 | ;;;###tramp-autoload |
| 68 | (defcustom tramp-histfile-override 'unset | 68 | (defcustom tramp-histfile-override t |
| 69 | "When invoking a shell, override the HISTFILE with this value. | 69 | "When invoking a shell, override the HISTFILE with this value. |
| 70 | By default, it is set to the symbol `unset', which unsets any | 70 | When setting to a string, it redirects the shell history to that |
| 71 | setting of HISTFILE. When setting to a string, it redirects the | 71 | file. Be careful when setting to \"/dev/null\"; this might |
| 72 | shell history to that file. Be careful when setting to | 72 | result in undesired results when using \"bash\" as shell. |
| 73 | \"/dev/null\"; this might result in undesired results when using | ||
| 74 | \"bash\" as shell. | ||
| 75 | 73 | ||
| 74 | The value t, the default value, unsets any setting of HISTFILE. | ||
| 76 | If you set this variable to nil, however, the *override* is | 75 | If you set this variable to nil, however, the *override* is |
| 77 | disabled, so the history will go to the default storage | 76 | disabled, so the history will go to the default storage |
| 78 | location, e.g. \"$HOME/.sh_history\"." | 77 | location, e.g. \"$HOME/.sh_history\"." |
| 79 | :group 'tramp | 78 | :group 'tramp |
| 80 | :version "25.1" | 79 | :version "25.1" |
| 81 | :type '(choice (const :tag "Do not override HISTFILE" nil) | 80 | :type '(choice (const :tag "Do not override HISTFILE" nil) |
| 82 | (const :tag "Unset HISTFILE" unset) | 81 | (const :tag "Unset HISTFILE" t) |
| 83 | (string :tag "Redirect to a file"))) | 82 | (string :tag "Redirect to a file"))) |
| 84 | 83 | ||
| 85 | ;;;###tramp-autoload | 84 | ;;;###tramp-autoload |
| @@ -3908,9 +3907,8 @@ file exists and nonzero exit status otherwise." | |||
| 3908 | (if tramp-histfile-override | 3907 | (if tramp-histfile-override |
| 3909 | (concat | 3908 | (concat |
| 3910 | "HISTFILE=" | 3909 | "HISTFILE=" |
| 3911 | (if (eq tramp-histfile-override 'unset) | 3910 | (if (stringp tramp-histfile-override) |
| 3912 | "" | 3911 | (tramp-shell-quote-argument tramp-histfile-override) "")) |
| 3913 | (tramp-shell-quote-argument tramp-histfile-override))) | ||
| 3914 | "") | 3912 | "") |
| 3915 | (tramp-shell-quote-argument tramp-end-of-output) | 3913 | (tramp-shell-quote-argument tramp-end-of-output) |
| 3916 | shell (or extra-args "")) | 3914 | shell (or extra-args "")) |
| @@ -4635,7 +4633,7 @@ connection if a previous connection has died for some reason." | |||
| 4635 | (setenv "LC_ALL" "en_US.utf8") | 4633 | (setenv "LC_ALL" "en_US.utf8") |
| 4636 | (when tramp-histfile-override | 4634 | (when tramp-histfile-override |
| 4637 | (setenv "HISTFILE" | 4635 | (setenv "HISTFILE" |
| 4638 | (and (not (eq tramp-histfile-override 'unset)) | 4636 | (and (stringp tramp-histfile-override) |
| 4639 | tramp-histfile-override))) | 4637 | tramp-histfile-override))) |
| 4640 | (setenv "PROMPT_COMMAND") | 4638 | (setenv "PROMPT_COMMAND") |
| 4641 | (setenv "PS1" tramp-initial-end-of-output) | 4639 | (setenv "PS1" tramp-initial-end-of-output) |