From 52d6358dd8dffd78812a10a52984ee7e5529a3b2 Mon Sep 17 00:00:00 2001 From: vindarel Date: Tue, 12 Nov 2024 09:46:51 +0100 Subject: [PATCH] filer: add filer-at-directory to prompt for a directory for https://github.com/lem-project/lem/issues/1597 --- src/ext/filer.lisp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/ext/filer.lisp b/src/ext/filer.lisp index 68f64296c..268e0253f 100644 --- a/src/ext/filer.lisp +++ b/src/ext/filer.lisp @@ -178,5 +178,15 @@ (let ((directory (buffer-directory))) (make-leftside-window (make-filer-buffer directory))))) +(define-command filer-at-directory () () + "Prompt for a directory and open the filer tree view at this directory." + (let ((directory (prompt-for-directory "Directory: " + :directory (buffer-directory) + :gravity :cursor + :use-border t))) + (when (filer-active-p) + (deactive-filer) + (make-leftside-window (make-filer-buffer directory))))) + (define-command filer-select () () (select (back-to-indentation (current-point))))