]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-unix.el
lisp/calc/calc-graph.el (calc-graph-show-dumb): Fix typo.
[gnu-emacs] / lisp / eshell / em-unix.el
index 9e061b6450429fbeaa10f7aa76db77de673757b7..94508d71592f361970905558c58bbd02f6c4080b 100644 (file)
@@ -306,12 +306,13 @@ Remove (unlink) the FILE(s).")
   (eshell-eval-using-options
    "mkdir" args
    '((?h "help" nil nil "show this usage screen")
+     (?p "parents" nil em-parents "make parent directories as needed")
      :external "mkdir"
      :show-usage
      :usage "[OPTION] DIRECTORY...
 Create the DIRECTORY(ies), if they do not already exist.")
    (while args
-     (eshell-funcalln 'make-directory (car args))
+     (eshell-funcalln 'make-directory (car args) em-parents)
      (setq args (cdr args)))
    nil))
 
@@ -1039,6 +1040,7 @@ Show wall-clock time elapsed during execution of COMMAND.")
 
 (defun eshell/su (&rest args)
   "Alias \"su\" to call Tramp."
+  (require 'tramp)
   (setq args (eshell-stringify-list (eshell-flatten-list args)))
   (let ((orig-args (copy-tree args)))
     (eshell-eval-using-options
@@ -1076,6 +1078,7 @@ Become another USER during a login session.")
 
 (defun eshell/sudo (&rest args)
   "Alias \"sudo\" to call Tramp."
+  (require 'tramp)
   (setq args (eshell-stringify-list (eshell-flatten-list args)))
   (let ((orig-args (copy-tree args)))
     (eshell-eval-using-options
@@ -1110,8 +1113,6 @@ Execute a COMMAND as the superuser or another USER.")
                          (format "%s|sudo:%s@%s:%s"
                                  (substring prefix 0 -1) user host dir)
                        (format "/sudo:%s@%s:%s" user host dir))))
-               ;; Ensure, that Tramp has connected to that construct already.
-               (ignore (file-exists-p default-directory))
                (eshell-named-command (car orig-args) (cdr orig-args))))))))
 
 (put 'eshell/sudo 'eshell-no-numeric-conversions t)