From 4d940109e3c2a81ca44df1dd6e807b7a5538fff8 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sat, 15 Sep 2018 23:57:12 +0200 Subject: misc: remove execution permission from various files --- themes/trapd00r.zsh-theme | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 themes/trapd00r.zsh-theme (limited to 'themes') diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme old mode 100755 new mode 100644 -- cgit v1.2.3-70-g09d2 From 150a3c9c834d824bdea5c8755963790e3c8efded Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Mon, 24 Sep 2018 08:11:57 -0400 Subject: agnoster: respect git config oh-my-zsh.hide-status (#6362) --- themes/agnoster.zsh-theme | 3 +++ 1 file changed, 3 insertions(+) (limited to 'themes') diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index d1a69c560..302de6e6f 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -96,6 +96,9 @@ prompt_context() { # Git: branch/detached head, dirty status prompt_git() { (( $+commands[git] )) || return + if [[ "$(git config --get oh-my-zsh.hide-status 2>/dev/null)" = 1 ]]; then + return + fi local PL_BRANCH_CHAR () { local LC_ALL="" LC_CTYPE="en_US.UTF-8" -- cgit v1.2.3-70-g09d2 From afa8dc46ecb1babda7db8fb8228224e8975e95f4 Mon Sep 17 00:00:00 2001 From: Carlo Dapor Date: Tue, 25 Sep 2018 21:46:27 +0200 Subject: Fix agnoster initial diagnostic error This PR fixes the runtime error that displays this: ```log prompt_status:2: symbols: attempt to assign array value to non-array ```. It trips over a local array which is not properly declared. --- themes/agnoster.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'themes') diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index d1a69c560..18496c2bc 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -212,8 +212,8 @@ prompt_virtualenv() { # - am I root # - are there background jobs? prompt_status() { - local symbols - symbols=() + local -a symbols=() + [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" [[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙" -- cgit v1.2.3-70-g09d2 From a3d13eb76a19bbe18b6b843232695645bd9aa632 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 26 Sep 2018 17:19:59 +0200 Subject: fix invalid syntax in old zsh versions --- themes/agnoster.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'themes') diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 18496c2bc..71ecf2b36 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -212,7 +212,7 @@ prompt_virtualenv() { # - am I root # - are there background jobs? prompt_status() { - local -a symbols=() + local -a symbols [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘" [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡" -- cgit v1.2.3-70-g09d2 From 3a6fa9149b7a3db89d22f40ae371ad636f5ed527 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Sun, 7 Oct 2018 22:57:16 +0200 Subject: Fix tilde substitution in theme prompts These themes used an adhoc substitution of $HOME for tilde in $PWD, but it's better to use '%~' and is less error prone. See #7160 --- themes/amuse.zsh-theme | 2 +- themes/candy-kingdom.zsh-theme | 2 +- themes/dstufft.zsh-theme | 2 +- themes/fino-time.zsh-theme | 3 +-- themes/fino.zsh-theme | 3 +-- 5 files changed, 5 insertions(+), 7 deletions(-) (limited to 'themes') diff --git a/themes/amuse.zsh-theme b/themes/amuse.zsh-theme index 4e7361ced..d3f15ace5 100644 --- a/themes/amuse.zsh-theme +++ b/themes/amuse.zsh-theme @@ -9,7 +9,7 @@ rbenv_version() { } PROMPT=' -%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%} +%{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info) ⌚ %{$fg_bold[red]%}%*%{$reset_color%} $ ' # Must use Powerline font, for \uE0A0 to render. diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index 9d2103926..30ce785c0 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -17,7 +17,7 @@ function box_name { } PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[yellow]%}$(box_name)%{$reset_color%}:%{$fg_bold[green]%}%~%{$reset_color%}$(hg_prompt_info)$(git_prompt_info) %(?,,%{${fg_bold[white]}%}[%?]%{$reset_color%} )$ ' ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[magenta]%}branch: " diff --git a/themes/dstufft.zsh-theme b/themes/dstufft.zsh-theme index 5a23fcea5..39ce69819 100644 --- a/themes/dstufft.zsh-theme +++ b/themes/dstufft.zsh-theme @@ -9,7 +9,7 @@ function virtualenv_info { } PROMPT=' -%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(git_prompt_info) +%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%~%{$reset_color%}$(git_prompt_info) $(virtualenv_info)$(prompt_char) ' ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}" diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme index c1a48d02a..9caebc69e 100644 --- a/themes/fino-time.zsh-theme +++ b/themes/fino-time.zsh-theme @@ -30,11 +30,10 @@ if type rvm-prompt &>/dev/null; then rvm_ruby='using%{$FG[243]%}‹$(rvm-prompt i v g)›%{$reset_color%}' fi -local current_dir='${PWD/#$HOME/~}' local git_info='$(git_prompt_info)' -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]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}${rvm_ruby} %D - %* +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_info} %{$FG[239]%}${rvm_ruby} %D - %* ╰─$(virtualenv_info)$(prompt_char) " ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme index 71ed6bbbc..28d6cc2ec 100644 --- a/themes/fino.zsh-theme +++ b/themes/fino.zsh-theme @@ -29,12 +29,11 @@ else fi fi -local current_dir='${PWD/#$HOME/~}' local git_info='$(git_prompt_info)' local prompt_char='$(prompt_char)' -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]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}${ruby_env} +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_info} %{$FG[239]%}${ruby_env} ╰─${prompt_char}%{$reset_color%} " ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" -- cgit v1.2.3-70-g09d2