From 081fb45e065487afb16becb7a110bbf8bd660b6b Mon Sep 17 00:00:00 2001 From: cage Date: Thu, 2 Mar 2023 17:51:13 +0100 Subject: [PATCH] - removed wrong assumption that input is a simple string when completing expanding the tilde as home of the user. --- src/complete.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/complete.lisp b/src/complete.lisp index 72d077c..9d00fff 100644 --- a/src/complete.lisp +++ b/src/complete.lisp @@ -58,11 +58,11 @@ See: complete:directory-complete") "Returns the supplied string, with a prefix of ~ or ~user expanded to the appropriate home directory." (if (and (> (length string) 0) - (eql (schar string 0) #\~)) + (eql (elt string 0) #\~)) (flet ((chop (s) (subseq s 0 (1- (length s))))) (let* ((slash-index (loop for i below (length string) - when (eql (schar string i) #\/) + when (eql (elt string i) #\/) return i)) (suffix (and slash-index (subseq string slash-index))) (uname (subseq string 1 slash-index))