Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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"