skarnet / execline

The execline scripting language
https://skarnet.org/software/execline/
ISC License
149 stars 19 forks source link

importas bug #3

Closed guijun closed 4 years ago

guijun commented 4 years ago

reproduce: backtick PWD { pwd } importas MYPATH PWD foreground { mkdir -p /logs${MYPATH} } take a look at /logs there is a ? in the path

skarnet commented 4 years ago

Not a bug. pwd prints a newline and you're not chomping it, so it appears verbatim in the PWD variable and in the MYPATH substitution. What you want is backtick -n PWD { pwd }. The -n option chomps the trailing newline.

guijun commented 4 years ago

thanks.