diff options
author | JSDurand <mmemmew@gmail.com> | 2023-02-25 15:56:38 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-02-25 15:56:38 +0800 |
commit | eef0f5cffb74bdce75dc099183a0d2dba84c12d3 (patch) | |
tree | d68341197520ec0f6bf15d5961ae0dd5a936f8ab | |
parent | 6f2a5b73aaf4d2610935d8bb476fc470475a1098 (diff) |
eshell: Call "dl" after cd.
* eshell-conf.el (eshell-list-files-after-cd): I used to set this
variable to call ls after cd. But I want to use my dl command now.
(eshell-directory-ls, eshell-directory-change-hook): Call "dl
--group-directories-first" after cd.
-rw-r--r-- | eshell-conf.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eshell-conf.el b/eshell-conf.el index 25ffffb..02036b7 100644 --- a/eshell-conf.el +++ b/eshell-conf.el @@ -660,7 +660,11 @@ For example, \"...\" expands into \"../..\"." ;;; List files after changing directories -(setq eshell-list-files-after-cd t) +(defun eshell-directory-ls () + "Call \"dl -g eshell-last-arguments\" after \"cd\"." + (eshell/dl "--group-directories-first" (cdr eshell-last-arguments))) + +(add-hook 'eshell-directory-change-hook #'eshell-directory-ls) ;;; Eshell bookmark handler |