From 19a13b82ff13848a3d014eea1a39dfe337bfa1ba Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 19 Aug 2012 12:13:23 +0200 Subject: emacs: Improve path segment regex --- emacs/eshell-init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emacs') 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) -- cgit v1.2.3-54-g00ecf