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

Re: Tag functions with shell options?



Zefram wrote:
 
> >So I think I need some way of marking these functions to be interpreted with
> >SH_WORD_SPLIT turned on locally.  Or have I missed something simple?
> 
> awkward_func () {
>   setopt local_options sh_word_split
>   ...
> }
> 
> This will set SH_WORD_SPLIT for the duration of the function, restoring
> the state when it returns.

Thanks for the response.  The trouble is that I can't alter awkward_func. Effectively
I have a library of Bourne shell functions which I'd like to use from zsh, without
knowing about their internals, and I can't see how to do it. 

Anthony




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