diff options
| author | 2026-04-13 14:47:10 -0700 | |
|---|---|---|
| committer | 2026-04-13 14:47:10 -0700 | |
| commit | 5a0a24b8c84cd768b27aed7cd03831522ae34cad (patch) | |
| tree | b6034000e72901fd8ebcaf47fab9ca7b3a4e1756 | |
| parent | 3b91f3feb74018ad6330ba7d3c8fab6ff70c552a (diff) | |
| download | emacs-config-5a0a24b8c84cd768b27aed7cd03831522ae34cad.tar.gz emacs-config-5a0a24b8c84cd768b27aed7cd03831522ae34cad.zip | |
oni-eshell: Fix issue when directory names aren't unique
When a directory name is a substring of another directory name, just return the
directory, we can't make it more unique than that.
| -rw-r--r-- | oni-eshell.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/oni-eshell.el b/oni-eshell.el index 6e01ad1..dae024b 100644 --- a/oni-eshell.el +++ b/oni-eshell.el @@ -4,7 +4,7 @@ ;; Author: Tom Willemse <tom@ryuslash.org> ;; Keywords: local -;; Version: 2025.1222.160029 +;; Version: 2026.0407.092049 ;; Package-Requires: (eshell-fringe-status esh-autosuggest xterm-color eshell-syntax-highlighting) ;; This program is free software; you can redistribute it and/or modify @@ -132,7 +132,8 @@ DIRECTORY should be a directory that exists within CURRENT-PATH." (zero-or-more any))) (matches (directory-files current-path nil dir-rx))) (when (= (length matches) 1) - (throw 'result current-directory)))))) + (throw 'result current-directory)))) + directory)) (defun oni-eshell-shorten-directory (directory) "Shorten DIRECTORY to the shortest unique names of each directory." |
