From fa9af1d2255e51a27275db9ff0247814441f4f09 Mon Sep 17 00:00:00 2001 From: Alexander Rosenberg Date: Sat, 25 Oct 2025 19:03:35 -0700 Subject: [PATCH] Fix extra escape characters in certain format codes --- clash/clash.lisp | 3 ++- clash/format.lisp | 15 ++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/clash/clash.lisp b/clash/clash.lisp index bb69a54..0e48f71 100644 --- a/clash/clash.lisp +++ b/clash/clash.lisp @@ -910,7 +910,8 @@ return a list of many indices instead." (merge-pathnames uiop:*wild-file-for-directory* (uiop:ensure-directory-pathname (merge-pathnames "files" dir)))))) - (format t "~A~:[~%~;~A~]" missing null #\Nul))))) + (format t "~A~:[~%~;~A~]" + (uiop:native-namestring missing) null #\Nul))))) (defun missing-file/handler (cmd) "Handler for the \"missing file\" subcommand." diff --git a/clash/format.lisp b/clash/format.lisp index 560c11c..cb708b5 100644 --- a/clash/format.lisp +++ b/clash/format.lisp @@ -276,12 +276,14 @@ The recognized printf-style sequences for ~A are: (make-format-code :name #\o :action (lambda (stream info) - (format stream "~A" (trashinfo-original-path info :resolve t))) + (format stream "~A" (uiop:native-namestring + (trashinfo-original-path info :resolve t)))) :doc "the (o)riginal path (always absolute)") (make-format-code :name #\O :action (lambda (stream info) - (format stream "~A" (trashinfo-original-path info :normalize t))) + (format stream "~A" (uiop:native-namestring + (trashinfo-original-path info :normalize t)))) :doc "the (o)riginal path (possibly relative)") (make-format-code :name #\n @@ -292,17 +294,20 @@ The recognized printf-style sequences for ~A are: (make-format-code :name #\d :action (lambda (stream info) - (format stream "~A" (trashinfo-trash-directory info))) + (format stream "~A" (uiop:native-namestring + (trashinfo-trash-directory info)))) :doc "the trash (d)irectory") (make-format-code :name #\i :action (lambda (stream info) - (format stream "~A" (trashinfo-info-file info))) + (format stream "~A" (uiop:native-namestring + (trashinfo-info-file info)))) :doc "the trash(i)nfo file path") (make-format-code :name #\c :action (lambda (stream info) - (format stream "~A" (trashinfo-trashed-file info))) + (format stream "~A" (uiop:native-namestring + (trashinfo-trashed-file info)))) :doc "the (c)urrent (trashed) path") (make-format-code :name #\u