diff options
-rw-r--r-- | init.el | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -297,3 +297,12 @@ (find-file file) (goto-line line)) (find-file (pop args))))) + +;; convenience function to go to the remote root when in a directory +;; on a remote host +(defun eshell/// () + "Go to the root directory on the remote host." + (let ((pieces (split-string (eshell/pwd) ":/"))) + (eshell/cd (if (> (length pieces) 1) + (concat (car pieces) ":/") + "/")))) |