summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Dana <ferdnyc@gmail.com>2025-03-31 15:22:00 -0700
committerBart Schaefer <schaefer@zsh.org>2025-03-31 15:22:00 -0700
commitb707a60351bb9224fb808b3155dfef3288eef039 (patch)
treec39748fc5ee45133a1b890c2b85f57397820b9d4
parentd70b70ada6b84602dd7793e0416378d3b4d0a8ad (diff)
downloadzsh-b707a60351bb9224fb808b3155dfef3288eef039.tar.gz
zsh-b707a60351bb9224fb808b3155dfef3288eef039.zip
53414: attempting to preview the "restore" keyword is nonsensical
-rw-r--r--ChangeLog4
-rw-r--r--Functions/Prompts/prompt_restore_setup14
2 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 8668a7af5..ed79feb18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2025-03-31 Bart Schaefer <schaefer@zsh.org>
+ * Frank Dana: 53414: Functions/Prompts/prompt_restore_setup:
+ attempting to preview the "restore" keyword is nonsensical,
+ use a handler function to avoid messing up terminal output
+
* Frank Dana: 53413: Functions/Prompts/promptinit: "print -rP"
in preview, in case of special characters
diff --git a/Functions/Prompts/prompt_restore_setup b/Functions/Prompts/prompt_restore_setup
index b77dbe815..c1f9bfb7e 100644
--- a/Functions/Prompts/prompt_restore_setup
+++ b/Functions/Prompts/prompt_restore_setup
@@ -1,3 +1,11 @@
-# Damn that was easy
-zstyle -t :prompt-theme cleanup
-zstyle -t :prompt-theme restore
+prompt_restore_setup () {
+ # Damn that was easy
+ zstyle -t :prompt-theme cleanup
+ zstyle -t :prompt-theme restore
+}
+
+prompt_restore_preview () {
+ echo "The prompt command 'restore' is not a theme and cannot be previewed."
+}
+
+prompt_restore_setup "$@"