From 5ad5e32b9f9f78aed62ba7da201f6749c4247cff Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Sat, 25 Jul 2020 12:16:23 +0200 Subject: [PATCH] Do not distinguish between login and non-login bash I.e., move all bash related configuration to bashrc, and call it from bash_profile. This should make things easier, I hope. --- bash_profile | 4 ---- bashrc | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/bash_profile b/bash_profile index 7f672e7..a61d6e1 100644 --- a/bash_profile +++ b/bash_profile @@ -1,10 +1,6 @@ # -*- sh -*- -export LANG=en_US.UTF-8 - [[ -r /etc/bashrc ]] && . /etc/bashrc [[ -r ~/.bashrc ]] && . ~/.bashrc -PATH=$HOME/.local/bin/:$PATH -export PATH diff --git a/bashrc b/bashrc index c010245..61364ed 100644 --- a/bashrc +++ b/bashrc @@ -2,6 +2,13 @@ # Based on example .bashrc as provided by Debian +# This file is only meant for interactive shells +[[ $- != *i* ]] && return + +# Environment variables go here +export LANG=en_US.UTF-8 +export PATH=${HOME}/.local/share/perl5/bin:${HOME}/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/local/bin:/usr/sbin:/sbin:/usr/local/sbin + # If not running interactively, don't do anything [ -z "$PS1" ] && return