Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Writing code that works with emulate zsh and emulate csh



On Feb 8,  6:45pm, Sebastian Gniazdowski wrote:
}
} It turns out that only a single option, CSH_JUNKIE_QUOTES, makes the
} error message that I receive:
} 
} ./zplugin.zsh:34: unmatched "
} 
} What in this file can trigger the message?
} 
} https://github.com/psprint/zplugin/blob/master/zplugin.zsh

cshjunkiequotes means you can't have a newline embedded in a quoted
string, so both the eval in --zplugin-shadow-autoload and the long
help text in zplugin will break.

} I then looked at the Wikipedia page and thought that emulate csh
} enables completely different language syntax. Now it might revealed
} that it just sets CSH_JUNKIE_QUOTES.

Well, it does more than that; it turns off glob qualifiers, changes the
way background jobs are monitored, disables =command expansion, enables
globbing in assignments and substitutions, and enables alternate loop
body syntax.  However, it's probably true that the only significant
parse-time (as opposed to execute-time) breakage of native zsh code is
for quoting.

} Maybe it could be possible to adapt zplugin.zsh to that option?

You could use a here-document for the help text in zplugin, and a single
line with semicolons for the eval body in shadow-autoload.



Messages sorted by: Reverse Date, Date, Thread, Author