branch: master commit b0c03718c6e5be9c24b539868a21379ff37b13ba Author: CeleritasCelery <t.mac...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Enable counsel-read-env to properly handle directories --- counsel.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/counsel.el b/counsel.el index 758ef92..6521ddd 100644 --- a/counsel.el +++ b/counsel.el @@ -1910,7 +1910,9 @@ minibuffer." (enable-recursive-minibuffers t) (x (ivy-read "Env: " cands)) (path (cdr (assoc x cands)))) - (insert path) + (insert (if (file-accessible-directory-p path) + (file-name-as-directory path) + path)) (ivy--cd-maybe)) (insert last-input-event)))