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

Re: how to capture and restore state of shell options



On Mon, Oct 20, 2025 at 04:27:28PM -0400, Mark J. Reed wrote:
> Having now tried it, this doesn't quite work:
> 
>     saved_options=$(mktemp)
>     set +o >$saved_options
>     .... do stuff ...
>     source $saved_options
>     rm -f $saved_options

Is there a specific reason to not call a function and use the
"localoptions" option?

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt




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