From 501575f0eebacecdddac9b6db3794714b5797b36 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 24 Aug 2022 19:31:37 -0300 Subject: etc/sh/rc: Separate interactive from non-interactive section with an early return --- etc/sh/rc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/etc/sh/rc b/etc/sh/rc index a08da74..9664940 100644 --- a/etc/sh/rc +++ b/etc/sh/rc @@ -284,12 +284,19 @@ export HISTCONTROL=ignorespace:ignoredups eval "$(direnv hook bash)" + +# +# From here on, interactive-only bash-specific things. +# + case $- in *i*) - for f in "$HOME_ENVIRONMENT"/profile/etc/bash_completion.d/*; do - . "$f" - done ;; *) + return ;; esac + +for f in "$HOME_ENVIRONMENT"/profile/etc/bash_completion.d/*; do + . "$f" +done -- cgit v1.2.3