elvish icon indicating copy to clipboard operation
elvish copied to clipboard

For loop fails as script but works in the REPL

Open sebastien opened this issue 5 months ago • 1 comments

What happened, and what did you expect to happen?

When running the following script using elvish script.elv fails with the following error Exception: exec: "str:trim": executable file not found in $PATH. However, copy-pasting each line in the REPL works as expected.

Script:

var lines = [one two three]
for line $lines { echo (str:trim $line ' ') }

Using Elvish 0.21.0

Output of "elvish -version"

0.21.0

Code of Conduct

sebastien avatar Sep 07 '24 06:09 sebastien