Provide a mechanism for writing safe wrappers to external commands #371
External commands mix options and arguments together, and this is a common source of errors. The following POSIX shell code breaks when there is any file whose name starts with a dash:
for f in *; do ls $f done
The correct way is to always write
In Elvish options use the special
ls &l # passes the "l" option; calls "e:ls -l" ls -l # lists the "-l" file; calls "e:ls -- -l" ls &l $x # calls "e:ls -l -- $x"
The text was updated successfully, but these errors were encountered: