{ f } [ { "CHAR:" } complete-char? ] unit-test
{ t } [ { "CHAR:" "" } complete-char? ] unit-test
{ t } [ { "CHAR:" "a" } complete-char? ] unit-test
+
+{ t } [ { "P\"" } complete-pathname? ] unit-test
+{ t } [ { "P\"" "" } complete-pathname? ] unit-test
+{ t } [ { "P\"" "~/" } complete-pathname? ] unit-test
+{ f } [ { "P\"~/\"" "" } complete-pathname? ] unit-test
+{ f } [ { "P\"~/\"" "asdf" } complete-pathname? ] unit-test
<PRIVATE
: complete-string? ( tokens token -- ? )
- { [ [ harvest ?last ] [ head? ] bi* ] [ complete-token? ] } 2|| ;
+ {
+ [
+ [ harvest ?last ] dip ?head
+ [ ?last CHAR: \" = not ] [ drop f ] if
+ ]
+ [ complete-token? ]
+ } 2|| ;
PRIVATE>