Populate LS_COLORS #8

Merged
sev merged 2 commits from LS_COLORS into master 7 years ago
  1. 5
      .bash_aliases
  2. 17
      .bash_profile

5
.bash_aliases

@ -1,8 +1,9 @@
alias 'x'='clear' alias 'x'='clear'
alias 'su+'='sudo -Ei' alias 'su+'='sudo -Ei'
alias 'll'="ls ${LS_OPTIONS} -hl"
alias 'la'="ls ${LS_OPTIONS} -hla"
alias 'ls'="/usr/bin/ls ${LS_OPTIONS} -h"
alias 'll'="/usr/bin/ls ${LS_OPTIONS} -hl"
alias 'la'="/usr/bin/ls ${LS_OPTIONS} -hla"
alias 'rm'='rm --preserve-root -v -I' alias 'rm'='rm --preserve-root -v -I'
alias 'chown'='chown --preserve-root -v' alias 'chown'='chown --preserve-root -v'
alias 'chmod'='chmod --preserve-root -v' alias 'chmod'='chmod --preserve-root -v'

17
.bash_profile

@ -109,6 +109,22 @@ __export_browser()
fi fi
} }
__export_ls_colors()
{
# Copied from Slackware's /etc/profile.d/coreutils-dircolors.sh
#
# Set up the LS_COLORS environment:
if [ -f "${HOME}/.dir_colors" ]; then
# shellcheck disable=SC2046
eval $(/bin/dircolors -b "${HOME}/.dir_colors")
elif [ -f /etc/DIR_COLORS ]; then
# shellcheck disable=SC2046
eval $(/bin/dircolors -b /etc/DIR_COLORS)
else
# shellcheck disable=SC2046
eval $(/bin/dircolors -b)
fi
}
# --- SSH agent --- # # --- SSH agent --- #
agent() agent()
@ -263,6 +279,7 @@ export PATH="${HOME}/.local/bin:${HOME}/bin:${PATH}"
export HISTCONTROL=ignoreboth:erasedups export HISTCONTROL=ignoreboth:erasedups
__export_ps __export_ps
__export_ls_colors
# shellcheck disable=SC2119 # shellcheck disable=SC2119
__export_pager __export_pager
# shellcheck disable=SC2119 # shellcheck disable=SC2119

Loading…
Cancel
Save