mirror of https://codeberg.org/cage/tinmop/
- removed wrong assumption that input is a simple string when completing expanding the tilde as home of the user.
This commit is contained in:
parent
283824f74a
commit
081fb45e06
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue