From e50b9e6462a4ac86ffeb47112fe7bb7702eab1b9 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 17 Sep 2016 18:50:18 +0100 Subject: [PATCH] is_empty --- etc/profile.d/functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index ca00e197..1b18f889 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -551,7 +551,7 @@ boot_loader() { return 0 } -function is_empty() { [[ -z $(ls -A "/$1") ]]; } +function is_empty() { [[ -z $(ls -A "/$1" | head -1) ]]; } is_prompt() { #[[ $- == *i* ]] && echo "Interactive" || echo "Not interactive" -- 2.47.3