Use the built-in eshell-split-path to split the directory path into
components instead of split-string which is not likely to work on all
systems.
(require 'swiper)
(require 'etags)
+(require 'esh-util)
;;* Utility
(defun counsel-more-chars (n)
"Return PROMPT appended with the parent directory."
(let ((directory counsel--git-grep-dir))
(format " [%s]: "
- (let ((dir-list (split-string directory "/")))
+ (let ((dir-list (eshell-split-path directory)))
(if (> (length dir-list) 3)
- (mapconcat
- #'identity
- (append '("..")
- (cl-subseq dir-list (- (length dir-list) 3)))
- "/")
+ (apply #'concat
+ (append '("...")
+ (cl-subseq dir-list (- (length dir-list) 3))))
directory)))))
(defun counsel-delete-process ()