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

Re: [PATCH] Docs: possible typo zshmisc with 'always'



On Thu, 08 May 2014 21:45:23 -0400
Eric Cook <llua@xxxxxxx> wrote:
> { true } always { false }; print $?
> returns 0 where zshmisc states it should return 1. Or was it actually
> supposed to return 1?
> 
> ---
>  Doc/Zsh/grammar.yo | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Doc/Zsh/grammar.yo b/Doc/Zsh/grammar.yo
> index b452e4c..dde67eb 100644
> --- a/Doc/Zsh/grammar.yo
> +++ b/Doc/Zsh/grammar.yo
> @@ -312,7 +312,7 @@ during the tt(try-list) is not useful (unless this
> forms part of an
>  enclosing tt(always) block).
>  
>  Regardless of tt(TRY_BLOCK_ERROR), after the end of tt(always-list) the
> -normal shell status tt($?) is the value returned from tt(always-list).
> +normal shell status tt($?) is the value returned from tt(try-list).
>  This will be non-zero if there was an error, even if tt(TRY_BLOCK_ERROR)
>  was set to zero.

This fix looks correct --- the sentence after doesn't make sense without
the correction, since the error referred to is in try-list.  Thanks.

pws



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