fix: quote % in box_name prompt functions

This commit is contained in:
Marc Cornellà committed 2022-01-03 13:50:52 +01:00
1 parent 43be5ea321
commit a9d57eb2ee
3 files changed
+9 -4

No files matched your search

+3 -1
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='