emacs: Improve path segment regex
This commit is contained in:
parent
f6b0811650
commit
19a13b82ff
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@
|
||||||
|
|
||||||
(defun oni:shorten-dir (dir)
|
(defun oni:shorten-dir (dir)
|
||||||
"Shorten a directory, (almost) like fish does it."
|
"Shorten a directory, (almost) like fish does it."
|
||||||
(while (string-match "\\(/\\.?.\\)[^/]+/" dir)
|
(while (string-match "\\(/\\.?[^./]\\)[^/]+/" dir)
|
||||||
(setq dir (replace-match "\\1/" nil nil dir)))
|
(setq dir (replace-match "\\1/" nil nil dir)))
|
||||||
dir)
|
dir)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue