summaryrefslogtreecommitdiffstats
path: root/emacs/eshell-init.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/eshell-init.el')
-rw-r--r--emacs/eshell-init.el2
1 files changed, 1 insertions, 1 deletions
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)