3737(require 'dashboard )
3838(require 'dashboard-widgets )
3939
40- (add-to-list 'dashboard-item-generators '(ls-directories . dashboard-ls--insert-file ))
41- (add-to-list 'dashboard-item-generators '(ls-files . dashboard-ls--insert-dir ))
40+ (add-to-list 'dashboard-item-generators '(ls-directories . dashboard-ls--insert-dir ))
41+ (add-to-list 'dashboard-item-generators '(ls-files . dashboard-ls--insert-file ))
4242
4343(defvar dashboard-ls-path nil
4444 " Update to date current path.
@@ -54,6 +54,8 @@ Use this variable when you don't have the `default-directory' up to date.")
5454 (dir-lst (f-directories current-dir))
5555 (opt-dir-lst '()))
5656 (dolist (dir dir-lst)
57+ (setq dir (s-replace current-dir " ./" dir))
58+ (setq dir (s-replace " //" " /" dir))
5759 (push (concat dir " /" ) opt-dir-lst))
5860 (reverse opt-dir-lst))
5961 list-size
@@ -65,10 +67,16 @@ Use this variable when you don't have the `default-directory' up to date.")
6567 " Add the list of LIST-SIZE items from current files."
6668 (dashboard-insert-section
6769 " Current Files:"
68- (let ((current-dir (if dashboard-ls-path
69- dashboard-ls-path
70- default-directory)))
71- (f-files current-dir))
70+ (let* ((current-dir (if dashboard-ls-path
71+ dashboard-ls-path
72+ default-directory))
73+ (file-lst (f-files current-dir))
74+ (opt-file-lst '()))
75+ (dolist (file file-lst)
76+ (setq file (s-replace current-dir " ./" file))
77+ (setq file (s-replace " //" " /" file))
78+ (push file opt-file-lst))
79+ (reverse opt-file-lst))
7280 list-size
7381 " f"
7482 `(lambda (&rest ignore) (find-file-existing , el ))
0 commit comments