1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-04 10:41:11 +02:00
zsh/Functions/Prompts/prompt_restore_setup
Arseny Maslennikov 8b67c36d92 48094: apply cleanup commands of the current theme on any theme change
* Rename zstyle `cleanup' on the context `:prompt-theme' to `restore'
  everywhere but in prompt_cleanup(). It is only used as a restore
  mechanism now.
* Ensure prompt_cleanup() continues to store its command list in the
  `cleanup' style.
* Clean up before theme switch at the end of set_prompt().
* Prepend every use of prompt_*_setup (which might modify the shell
  state in ways that require cleanup) with a cleanup run.
* Adjust `prompt restore' to do both parts of the newly split restore
  mechanism, cleanup first.
2021-02-22 20:29:55 -08:00

3 lines
85 B
Text

# Damn that was easy
zstyle -t :prompt-theme cleanup
zstyle -t :prompt-theme restore