set my_doc_list to {do shell script "ls -al ~/Documents"}
The other new command is POSIX path of [mac path]. Sadly, this only does half the job. It does change the ":" delimiters to "/" and adds the "/Volumes/" directory for mounted volumes, but it does not add the escapes for special characters.
If you'd like an AppleScript soubroutine that finishes the job, read the rest of the article. Note: this still can't handle high-bit characters in the path (option-f for instance).
The following subroutine will add the escapes required for special characters in the path:
on unix_path(mac_path)
set unixpath to (POSIX path of mac_path)
set chars to every character of unixpath
repeat with i from 1 to length of chars
if "!$&\"'*(){[|;<>?~` \\" contains (item i of chars as text) then
set item i of chars to "\\" & (item i of chars as text)
end if
end repeat
return every item of chars as string
end unix_path

