diff --git a/etc/pol_bash b/etc/pol_bash index 7911f05..bd891e4 100644 --- a/etc/pol_bash +++ b/etc/pol_bash @@ -29,7 +29,15 @@ export HISTCONTROL=ignoreboth shopt -s checkwinsize # make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" +less_pipe_cmd=$(lesspipe 2> /dev/null) +if [ "$less_pipe_cmd" == export* ]; then + eval "$(lesspipe)" +else + if [ -x /usr/bin/lesspipe ]; then + export LESSOPEN='| lesspipe %s' + fi +fi +unset less_pipe_cmd # set variable identifying the chroot you work in (used in the prompt below) if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then @@ -73,7 +81,9 @@ fi # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). -if [ -f /etc/bash_completion ]; then - . /etc/bash_completion -fi - +for bashcomp in /etc/{bash_completion,profile.d/bash-completion.sh}; do + if [ -r "$bashcomp" ]; then + . "$bashcomp" + fi +done +unset bashcomp