1
0
Fork 0
mirror of https://github.com/roles-ansible/ansible_role_dotfiles.git synced 2024-08-16 16:09:49 +02:00
ansible_role_dotfiles/templates/bashrc
2021-01-07 19:28:02 +01:00

52 lines
1.3 KiB
Bash

# .bashrc
# Source global definitions
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
# User specific environment
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
export PATH
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
{% for alias in dotfiles__aliases %}
{% if alias.color %}
alias {{ alias.alias }}="{{ alias.command }} --color=auto"
{% endif%}
{% endfor %}
fi
{% for alias in dotfiles__aliases %}
{% if not alias.color %}
alias {{ alias.alias }}="{{ alias.command }}"
{% endif%}
{% endfor %}
# hostory controll
HISTCONTROL={{ dotfiles__history_control }}
shopt -s histappend
{% if ansible_os_family == 'Redhat' %}
# HISTSIZE={{ dotfiles__history_size }}
# HISTFILESIZE={{ dotfiles__history_file_size }}
{% elif ansible_distribution == "CentOS" %}
# HISTSIZE={{ dotfiles__history_size }}
# HISTFILESIZE={{ dotfiles__history_file_size }}
{% else %}
HISTSIZE={{ dotfiles__history_size }}
HISTFILESIZE={{ dotfiles__history_file_size }}
{% endif %}
{% for _row in dotfiles__additional_user_bashrc_lines | default() %}
{{ _row }}
{% endfor %}
{% for custom in dotfiles__custom_config %}
{% if custom.user == item %}
{{ custom.cmd }}
{% endif %}
{% endfor %}
# vim:ts=4:sw=4