X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=stdlib%2Fprelude.gl;h=fdb23e9ecd2f6e7b43820c34621bec4b24c0d914;hb=a48b05d35f0646322e8178ff10f8ed7af3e739aa;hp=f9fa6428d5d8211136f873d96b9fb56c2d5c7632;hpb=2ac1b84cb49ad04e27b4543436b0227153fbfb15;p=goals.git diff --git a/stdlib/prelude.gl b/stdlib/prelude.gl index f9fa642..fdb23e9 100644 --- a/stdlib/prelude.gl +++ b/stdlib/prelude.gl @@ -40,29 +40,21 @@ tactic *exists (filename) = { #---------------------------------------------------------------------- # Text functions. -# Sort + uniq a list. -function sort (xs) = { - # XXX Quoting - echo '[' - for f in %xs; do echo "$f"; done | - sort -u | - sed 's/.*/"&",/' - echo ']' -} + #---------------------------------------------------------------------- # File functions. # Expand a wildcard into a list of filenames. function wildcard (wc) = { - # XXX Quoting shopt -s nullglob # Note that the substitution is quoted by goals, so to expand # it we must assign it to a variable and then use it unquoted. wc=%wc echo '[' for f in $wc; do - echo "\"$f\"," + quoted_string "$f" + echo ',' done echo ']' }