summaryrefslogtreecommitdiff
path: root/themes/fino-time.zsh-theme
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
committerTuowen Zhao <ztuowen@gmail.com>2022-02-19 17:12:23 -0600
commitcae9a2b797649379e865e6bd73bc67e294e4ac77 (patch)
tree481419eff4bc761c3ca516704427394193473419 /themes/fino-time.zsh-theme
parent49edbf438ed690c76e6b2af80368c59404cf0167 (diff)
parent3427da4057dbe302933a7b5b19b4e23bfb9d0969 (diff)
downloadzsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.gz
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.tar.bz2
zsh-cae9a2b797649379e865e6bd73bc67e294e4ac77.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'themes/fino-time.zsh-theme')
-rw-r--r--themes/fino-time.zsh-theme5
1 files changed, 3 insertions, 2 deletions
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) "