From: Oleg Broytman Date: Thu, 9 Nov 2023 10:58:59 +0000 (+0300) Subject: .bashrc: Separate two tests for the case the dir doesn't exist X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=35854e26270711d9e3154082ac9c2d1ab2c4225c .bashrc: Separate two tests for the case the dir doesn't exist --- diff --git a/.bashrc b/.bashrc index 12b8016..48b9a04 100644 --- a/.bashrc +++ b/.bashrc @@ -143,8 +143,8 @@ DELEGATE_NOSPACE=1 delegate_completion rsync r rsync_cgmn rsync_cgmn_recode rsyn delegate_completion ssh s delegate_completion wget wget-m wget-wrapper ww -if [ -d "$HOME"/.bash_completion.d -a \ - -n "`ls -A $HOME/.bash_completion.d`" ]; then +if [ -d "$HOME"/.bash_completion.d ] && + [ -n "`ls -A $HOME/.bash_completion.d`" ]; then for _compf in "$HOME"/.bash_completion.d/*; do . $_compf done