From cb323ec6c07dfd4198297bba4d2cae877135c04c Mon Sep 17 00:00:00 2001 From: Xavier Logerais Date: Fri, 28 Jun 2024 08:31:10 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20Utilise=20nullglob=20pour=20=C3=A9viter?= =?UTF-8?q?=20les=20erreurs=20de=20r=C3=A9pertoires=20vides?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bashrc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bashrc b/bashrc index 5c8fa6a..3595d04 100644 --- a/bashrc +++ b/bashrc @@ -11,6 +11,9 @@ if [[ $- != *i* ]]; then return fi +# Safe loops for empty dirs +shopt -s nullglob + # Source custom libs if [ -d "$HOME"/.bash/libs ]; then for lib in "$HOME"/.bash/libs/*.bash; do source "$lib"; done; fi @@ -36,3 +39,6 @@ if [ -d "$HOME"/.bash/completion.d ]; then for file in "$HOME"/.bash/completion. # Late customization if [ -d "$HOME"/.bash/rc.after.d ]; then for file in "$HOME"/.bash/rc.after.d/*; do source "$file"; done; fi + +# Restore option nullglob to normal +shopt -u nullglob