summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2010-07-16 14:09:55 +0200
committerMichael Albinus <michael.albinus@gmx.de>2010-07-16 14:09:55 +0200
commit7e4289ad2bbd9f8ed18902f652d3f07380b227bf (patch)
tree8d5f675915799f09f8a7c38a0e14e89a3d290beb /lisp
parent23243f297116ec8141b296af8449aa89aa7f12a9 (diff)
downloademacs-7e4289ad2bbd9f8ed18902f652d3f07380b227bf.tar.gz
emacs-7e4289ad2bbd9f8ed18902f652d3f07380b227bf.tar.bz2
emacs-7e4289ad2bbd9f8ed18902f652d3f07380b227bf.zip
* net/tramp.el (tramp-handle-shell-command): Don't use hard-wired
"/bin/sh" but `tramp-remote-sh' from `tramp-methods'. (tramp-find-shell): Simplify setting connection property. (tramp-get-ls-command): Make test for "--color=never" stronger.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/net/tramp.el22
2 files changed, 21 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ab900c69a14..199c8243188 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2010-07-16 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-handle-shell-command): Don't use hard-wired
+ "/bin/sh" but `tramp-remote-sh' from `tramp-methods'.
+ (tramp-find-shell): Simplify setting connection property.
+ (tramp-get-ls-command): Make test for "--color=never" stronger.
+
2010-07-15 Simon South <ssouth@member.fsf.org>
* progmodes/delphi.el (delphi-previous-indent-of): Indent case
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 8e9ca34f16b..a231ef29880 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4683,7 +4683,12 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
(let* ((asynchronous (string-match "[ \t]*&[ \t]*\\'" command))
;; We cannot use `shell-file-name' and `shell-command-switch',
;; they are variables of the local host.
- (args (list "/bin/sh" "-c" (substring command 0 asynchronous)))
+ (args (list
+ (tramp-get-method-parameter
+ (tramp-file-name-method
+ (tramp-dissect-file-name default-directory))
+ 'tramp-remote-sh)
+ "-c" (substring command 0 asynchronous)))
current-buffer-p
(output-buffer
(cond
@@ -6619,12 +6624,10 @@ file exists and nonzero exit status otherwise."
(t (tramp-message
vec 5 "Remote `%s' groks tilde expansion, good"
- (tramp-get-method-parameter
- (tramp-file-name-method vec) 'tramp-remote-sh))
- (tramp-set-connection-property
- vec "remote-shell"
- (tramp-get-method-parameter
- (tramp-file-name-method vec) 'tramp-remote-sh))))))))
+ (tramp-set-connection-property
+ vec "remote-shell"
+ (tramp-get-method-parameter
+ (tramp-file-name-method vec) 'tramp-remote-sh)))))))))
;; ------------------------------------------------------------
;; -- Functions for establishing connection --
@@ -8316,10 +8319,13 @@ necessary only. This function will be used in file name completion."
;; Check parameters. On busybox, "ls" output coloring is
;; enabled by default sometimes. So we try to disable it
;; when possible. $LS_COLORING is not supported there.
+ ;; Some "ls" versions are sensible wrt the order of
+ ;; arguments, they fail when "-al" is after the
+ ;; "--color=never" argument (for example on FreeBSD).
(when (zerop (tramp-send-command-and-check
vec (format "%s -lnd /" result)))
(when (zerop (tramp-send-command-and-check
- vec (format "%s --color=never /" result)))
+ vec (format "%s --color=never -al /" result)))
(setq result (concat result " --color=never")))
(throw 'ls-found result))
(setq dl (cdr dl))))))