diff options
author | rekado <rekado@elephly.net> | 2014-09-03 12:44:21 +0200 |
---|---|---|
committer | rekado <rekado@elephly.net> | 2014-09-03 12:44:21 +0200 |
commit | 928dc209bdbdd621a44f3033a57cceb82b7daa9b (patch) | |
tree | 5085a6eccc9de583d3b1c17b8ebc6f3986b2d669 /init.el | |
parent | 91484e3d06a6d5ac252694f77dc653c8920848a8 (diff) |
eshell: add convenience function to jump to remote root dir
Diffstat (limited to 'init.el')
-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) ":/") + "/")))) |