# HG changeset patch # User Mikael Berthe # Date 1583151370 -3600 # Node ID 157f894ef9f762629731d803f8be602e5553fe45 # Parent 7b48c4ff8d361d4e9f1a235d6c4929a5ba58a669 Add some quotes and double brackets... diff -r 7b48c4ff8d36 -r 157f894ef9f7 README --- a/README Wed May 08 15:18:39 2019 +0200 +++ b/README Mon Mar 02 13:16:10 2020 +0100 @@ -7,7 +7,7 @@ === export ZDOTDIR=~/.zsh -[ -f $ZDOTDIR/zshenv ] && . $ZDOTDIR/zshenv +[[ -f "$ZDOTDIR/zshenv" ]] && . "$ZDOTDIR/zshenv" === Comments and suggestions are welcome! diff -r 7b48c4ff8d36 -r 157f894ef9f7 zshrc.d/15-completion.zrc --- a/zshrc.d/15-completion.zrc Wed May 08 15:18:39 2019 +0200 +++ b/zshrc.d/15-completion.zrc Mon Mar 02 13:16:10 2020 +0100 @@ -18,10 +18,10 @@ # Hosts completion -if [ -f ~/.ssh/config ]; then +if [[ -f ~/.ssh/config ]]; then hosts=($hosts `grep ^Host ~/.ssh/config | sed s/Host\ // | egrep -v '^\*$'`) fi -if [ "$hosts" ]; then +if [[ "$hosts" ]]; then zstyle ':completion:*:hosts' hosts $hosts fi diff -r 7b48c4ff8d36 -r 157f894ef9f7 zshrc.d/20-prompt.zrc --- a/zshrc.d/20-prompt.zrc Wed May 08 15:18:39 2019 +0200 +++ b/zshrc.d/20-prompt.zrc Mon Mar 02 13:16:10 2020 +0100 @@ -73,7 +73,7 @@ r=$(__git_ps1) # If GIT_PS1_SHOWUNTRACKEDFILES is used, we need to escape the % r=${r//\%/%%} - if [ ! -z $r ]; then echo -e "\n%Bgit%b$r"; fi + if [[ ! -z $r ]]; then echo -e "\n%Bgit%b$r"; fi } function __prompt_set_dev { @@ -182,7 +182,7 @@ [%B%n%b:%l] %{$fg[red]%}%m%{$reset_color%}%# " export PS1 - export _PROMPT_DEFINED="blackwhite" + export _PROMPT_DEFINED="color" } function prompt_set_dev { diff -r 7b48c4ff8d36 -r 157f894ef9f7 zshrc.d/50-local.zrc --- a/zshrc.d/50-local.zrc Wed May 08 15:18:39 2019 +0200 +++ b/zshrc.d/50-local.zrc Mon Mar 02 13:16:10 2020 +0100 @@ -3,4 +3,4 @@ # Local customization # ####################### -[ -f $ZDOTLOCALDIR/zshrc ] && . $ZDOTLOCALDIR/zshrc +[[ -f "$ZDOTLOCALDIR/zshrc" ]] && . "$ZDOTLOCALDIR/zshrc"