From eef0f5cffb74bdce75dc099183a0d2dba84c12d3 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Sat, 25 Feb 2023 15:56:38 +0800 Subject: 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. --- eshell-conf.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-18-g5258