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

syntax error despite abort [Was: simplify and if then else]



2008/9/24 Mikael Magnusson <mikachu@xxxxxxxxx>:
> A bit longer but arguably still simpler :)
> cd /$([[ "$LOGNAME" != davidr ]] && echo o || echo c)/inetpub/wwdev/blabla

I wanted to try if you could use anonymous functions somehow to shorten
it a bit (probably not), but I encountered this
% function foo() { } hello syntax error
zsh: correct 'hello' to 'bell' [nyae]? a
zsh: parse error near `hello'
%

There is probably some explanation for why this is so, like there is for why
I have to use my mouse to cut and paste when there's a syntax error involving
some internal keywords, but maybe it's a simple bug that can be fixed? (hah)

-- 
Mikael Magnusson



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