From 62b9457dea7527a178bf97164b49bd613168a80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Sun, 9 Jan 2022 14:05:25 +0100 Subject: [PATCH] Fix the error that appears when `thefuck` is not installed --- aliasrc | 5 ----- zshrc | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/aliasrc b/aliasrc index 0336feb..315b2e1 100644 --- a/aliasrc +++ b/aliasrc @@ -27,11 +27,6 @@ ex () fi } -test () -{ -echo test; -} - pacmanupdate () { echo "Enter your country (like 'US' or 'CZ')"; diff --git a/zshrc b/zshrc index 87ea32e..86a48d4 100644 --- a/zshrc +++ b/zshrc @@ -37,7 +37,11 @@ export YSU_MESSAGE_POSITION="after" [ -f "$HOME/zsh/aliasrc" ] && source "$HOME/zsh/aliasrc" # Initialize `thefuck` -eval $(thefuck --alias) +if command -v thefuck &> /dev/null +then + eval $(thefuck --alias) +fi + # Load ; should be last. source $HOME/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null