From a9d57eb2eec4d6234c4714a430ddfb4c57443570 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Mon, 27 Dec 2021 15:01:25 +0100 Subject: fix: quote % in `box_name` prompt functions --- themes/fino-time.zsh-theme | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'themes/fino-time.zsh-theme') diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme index 57c47db02..c7e2d965e 100644 --- a/themes/fino-time.zsh-theme +++ b/themes/fino-time.zsh-theme @@ -21,10 +21,11 @@ function prompt_char { } 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="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}%~%{$reset_color%}\$(git_prompt_info)\$(ruby_prompt_info) %D - %* ╰─\$(virtualenv_info)\$(prompt_char) " -- cgit v1.2.3-70-g09d2