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

Re: Want to replace bash w zsh as system shell on Ubuntu



On Tuesday 02 February 2010 20:04:13 Frank Terbeck wrote:
> [snip]
> zsh% foo=( foo bar baz )
> zsh% set -x; [[ -n $foo ]]; set +x
> +/bin/zsh:234> [[ -n 'foo bar baz' ]]
> +/bin/zsh:234> set +x
> [snap]

I don't know but I would guess the debugging output is only some kind of 
textual representation of what would be done but isn't done actually done. 
Much like "$(<file)" isn't the same as "$(cat file)". Only in in an logical 
sense.


By the way what is this syntax actually: (( ${#foo} > 0 ))
I would use a conditional expressions: [[ ${#foo} -gt 0 ]]
I only remember the syntax (( a = 4 + 3 )) as an alternative to let and a 
arithmetic evaluation like "print $((4+3))".

Attachment: signature.asc
Description: This is a digitally signed message part.



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