#!/bin/bash - not strictly necessary, but helps nano with syntax highlighting.
# Bash shell environmental set up.

export LANG="en_GB.UTF-8"
export LC_COLLATE="POSIX"	# 'C' causes issues with some applications
export PATH="/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
hash less >/dev/null 2>&1 && export PAGER="less"
hash nano >/dev/null 2>&1 && export EDITOR="nano" && export VISUAL="$EDITOR"

[[ "$TERM" == screen.* ]] && export TERM="${TERM#screen.}"

[[ -d "$HOME/files/bin" ]] && export PATH="$HOME/files/bin:$PATH"
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
[[ -d "$HOME/bin" ]] && export PATH="$HOME/bin:$PATH"

for FILE in "$HOME"/.bash_profile.d/*; do
  [[ -x "$FILE" ]] && source "$FILE"
done
unset FILE

[[ -f "$HOME/.bashrc" ]] && . "$HOME/.bashrc"
