mirror of
https://github.com/trailofbits/dropkit
synced 2026-06-21 14:11:54 +00:00
Fix Jinja2 escaping of zsh PROMPT in cloud-init template (#41)
* Fix Jinja2 escaping of zsh PROMPT in cloud-init template
The zsh PROMPT string contains `%` sequences that Jinja2 interprets
as template syntax. Wrap in {% raw %}...{% endraw %} to preserve
the literal prompt definition.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Add a warning to the cloud-init jinja template
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
GitHub
parent
5982a3b55e
commit
fde89df590
@@ -1,4 +1,5 @@
|
||||
#cloud-config
|
||||
# Warning: This whole file will be evaluated by Jinja. Escape any special literals (`{{`, `{%`, `{#`).
|
||||
|
||||
# Update and upgrade system packages
|
||||
package_update: true
|
||||
@@ -47,7 +48,7 @@ write_files:
|
||||
defer: true
|
||||
content: |
|
||||
# Prompt: user@host:dir (green for normal, red after failed command)
|
||||
PROMPT='%F{%(?.green.red)}%n@%m%f:%F{blue}%~%f$ '
|
||||
{% raw %}PROMPT='%F{%(?.green.red)}%n@%m%f:%F{blue}%~%f$ '{% endraw %}
|
||||
|
||||
# History
|
||||
HISTFILE=~/.zsh_history
|
||||
|
||||
Reference in New Issue
Block a user