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

Re: [Feature Request]: Globally updated Variables for all zsh instances for same user - just like fish shell



On Jul 13,  8:04pm, Mikael Magnusson wrote:
}
} > We're almost certainly not going to implement the fish model of having a
} > background server process that all other shells can contact to receive
} > environment variable updates.
} 
} One half of it is fairly easy, you can just install a zle -F handler
} (possibly coupled with the zsh/socket module) that updates parameters
} that another process sends it.

The example in the doc for "zle -F" provides a template for this, but I
think a file-based exchange would be preferable.

} The other half, hooking into an
} assignment of an arbitrary parameter to send it out again, I can't
} think of any way of doing.

There's no good way to make "export -U" work, but a module implemented
in the manner of zsh/db/gdbm could define the "exportglobal" command
to create specially-tied variables.  Could even use a GDBM file as the
persistence mechanism, it'd be almost exactly the same as what db_gdbm.c
already does if you limit the universal globals to scalars (otherwise
you have to deal with serializing arrays/hashes).



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