diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2015-04-01 05:03:50 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2015-04-01 05:03:50 +0300 |
commit | 32e6ebc88d3c71a02e6f90638accce076a08fec9 (patch) | |
tree | 5e099a85db8a62b44ad4db6c5f8797466f981e92 /powerlevel9k.zsh-theme | |
parent | 3f890310c6675cd4b9955fe895856b11a240b99c (diff) | |
parent | c88cfb8b73f7884c7861d32c118cfe6294980ff0 (diff) |
Merge branch 'master' into dritter/changeset_hash_length
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index d9e4485d..ef4bac9b 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -52,7 +52,7 @@ autoload -Uz vcs_info local VCS_WORKDIR_DIRTY=false local VCS_CHANGESET_PREFIX='' -if [ $POWERLEVEL9K_SHOW_CHANGESET ]; then +if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then # Default: Just display the first 12 characters of our changeset-ID. local VCS_CHANGESET_HASH_LENGTH=12 if [[ -n $POWERLEVEL9K_CHANGESET_HASH_LENGTH ]]; then @@ -78,7 +78,7 @@ zstyle ':vcs_info:hg*:*' branchformat "%b" # The `get-revision` function must be turned on for dirty-check to work for Hg zstyle ':vcs_info:hg*:*' get-revision true -if [ $POWERLEVEL9K_SHOW_CHANGESET ]; then +if [[ "$POWERLEVEL9K_SHOW_CHANGESET" == true ]]; then zstyle ':vcs_info:*' get-revision true else # A little performance-boost for large repositories (especially Hg). If we @@ -149,7 +149,7 @@ prompt_vcs() { local vcs_prompt="${vcs_info_msg_0_}" if [[ -n $vcs_prompt ]]; then - if ( $VCS_WORKDIR_DIRTY ); then + if [[ "$VCS_WORKDIR_DIRTY" == true ]]; then $1_prompt_segment yellow $DEFAULT_COLOR else $1_prompt_segment green $DEFAULT_COLOR @@ -301,7 +301,7 @@ prompt_aws() { # Main prompt build_left_prompt() { - if (( ${#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS} == 0 )); then + if [[ ${#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS} == 0 ]]; then POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(context dir rbenv vcs) fi @@ -316,7 +316,7 @@ build_left_prompt() { build_right_prompt() { RETVAL=$? - if (( ${#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS} == 0 )); then + if [[ ${#POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS} == 0 ]]; then POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(longstatus history time) fi @@ -333,7 +333,7 @@ precmd() { vcs_info_hookadd set-message vcs-detect-changes } -if [ $POWERLEVEL9K_PROMPT_ON_NEWLINE ] ; then +if [[ "$POWERLEVEL9K_PROMPT_ON_NEWLINE" == true ]]; then PROMPT='╭─%{%f%b%k%}$(build_left_prompt) ╰─ ' else |