From b7d290255992b1ee610d818fcf04c5081f17e603 Mon Sep 17 00:00:00 2001 From: xerus2000 <27jf@pm.me> Date: Wed, 14 Oct 2020 14:48:03 +0200 Subject: [PATCH] config/zsh: Swallow errors in incomplete setup & return 0 --- .config/zsh/.gitignore | 1 + .config/zsh/.zlogout | 3 +-- .config/zsh/.zshrc | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 .config/zsh/.gitignore diff --git a/.config/zsh/.gitignore b/.config/zsh/.gitignore new file mode 100644 index 0000000..dea2d4f --- /dev/null +++ b/.config/zsh/.gitignore @@ -0,0 +1 @@ +.zcompdump diff --git a/.config/zsh/.zlogout b/.config/zsh/.zlogout index 7150abb..a4d6405 100644 --- a/.config/zsh/.zlogout +++ b/.config/zsh/.zlogout @@ -1,2 +1 @@ -echo "user-zlogout">>/var/tmp/testi -/usr/local/bin/timew stop +/usr/local/bin/timew stop 2>/dev/null diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index a7f57a1..818858e 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -1,9 +1,9 @@ # Commands -if test "$PWD" = ~ && test "$0" != "$SHELL"; then +if test "$PWD" = "$HOME" && test "$0" != "$SHELL"; then neofetch --config $XDG_CONFIG_HOME/neofetch/config-short.conf task next limit:3 timew | head -3 -fi +fi 2>/dev/null || return 0 # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc. # Initialization code that may require console input (password prompts, [y/n] @@ -179,6 +179,6 @@ export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion # To customize prompt, run `p10k configure` or edit .p10k.zsh. -test -f $CONFIG_ZSH/.p10k.zsh && source $CONFIG_ZSH/.p10k.zsh +test -s $CONFIG_ZSH/.p10k.zsh && source $CONFIG_ZSH/.p10k.zsh -test -d /usr/share/fzf && source /usr/share/fzf/key-bindings.zsh && source /usr/share/fzf/completion.zsh +test -d /usr/share/fzf && source /usr/share/fzf/key-bindings.zsh && source /usr/share/fzf/completion.zsh || return 0