From 5a0a24b8c84cd768b27aed7cd03831522ae34cad Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Mon, 13 Apr 2026 14:47:10 -0700 Subject: 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. --- oni-eshell.el | 5 +++-- 1 file 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 ;; 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." -- cgit v1.3-2-g0d8e