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

Re: Tag functions with shell options?



>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.

-zefram




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