fix: quote % in box_name prompt functions

This commit is contained in:
Marc Cornellà 2021-12-27 15:01:25 +01:00
commit a9d57eb2ee
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B
3 changed files with 9 additions and 4 deletions

View file

@ -11,7 +11,9 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset
fi
function box_name {
[ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST}
local box="${SHORT_HOST:-$HOST}"
[[ -f ~/.box-name ]] && box="$(< ~/.box-name)"
echo "${box:gs/%/%%}"
}
PROMPT='