chiark / gitweb /
dot/shell-rc, dot/bashrc, dot/zshrc: Introduce a formal notion of hooks.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 21 Apr 2020 11:54:55 +0000 (12:54 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 21 Apr 2020 11:54:55 +0000 (12:54 +0100)
commit4877b8d8f0fd312be08bf10a8ec4f2ac7b7c952b
tree2e46ff56ca2e6b171d4b2fb9cc391f797e8cd089
parentd90fb8419fd562d9e496a39cb37fa8b96b9f5ef7
dot/shell-rc, dot/bashrc, dot/zshrc: Introduce a formal notion of hooks.

Replace the `__mdw_precmd' and `__mdw_preexec' functions with hooks.
Each shell implementation is responsible for calling the hooks at the
right time, but the common core is responsible for maintaining the hooks
and doing the job of invoking the hook functions.

Use this machinery for the prompt setting and `screen' status things.
dot/bashrc
dot/shell-rc
dot/zshrc