diff --git a/emacs/eshell-init.el b/emacs/eshell-init.el index 16f221d..9309b3f 100644 --- a/emacs/eshell-init.el +++ b/emacs/eshell-init.el @@ -54,7 +54,7 @@ (defun oni:shorten-dir (dir) "Shorten a directory, (almost) like fish does it." - (while (string-match "\\(/\\.?.\\)[^/]+/" dir) + (while (string-match "\\(/\\.?[^./]\\)[^/]+/" dir) (setq dir (replace-match "\\1/" nil nil dir))) dir)