[file manager] display only file names, not full paths

This commit is contained in:
contrapunctus 2021-04-18 01:51:49 +05:30
parent 493b12219c
commit a008e31c47
1 changed files with 8 additions and 2 deletions

View File

@ -2,7 +2,7 @@
(defpackage :magrathea.file-manager
(:use :clim :clim-lisp)
(:import-from :uiop :directory-files)
(:import-from :uiop :directory-files :enough-pathname)
(:export :run-file-manager))
(in-package :magrathea.file-manager)
@ -24,7 +24,13 @@
(:layouts (default (vertically () app int))))
(defun display-files (frame pane)
(format pane "~{~s~}" (files frame)))
;; display each
(loop for path in (files frame)
do (with-output-as-presentation
(pane path 'file)
(format pane "~a~%"
(enough-pathname path
*default-pathname-defaults*)))))
(define-file-manager-command (com-quit :name t) ()
(frame-exit *application-frame*))