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

53 lines
1.3 KiB
Bash
Raw Normal View History

2018-11-15 10:26:52 +01:00
# .bashrc
# Source global definitions
2018-11-18 16:21:06 +01:00
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
2018-11-15 10:26:52 +01:00
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
2018-11-15 10:26:52 +01:00
{% 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
2021-01-07 19:28:02 +01:00
{% 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 }}
2021-01-07 19:28:02 +01:00
{% endif %}
{% for _row in dotfiles__additional_user_bashrc_lines | default() %}
{{ _row }}
{% endfor %}
{% for custom in dotfiles__custom_config %}
{% if custom.user == item %}
{{ custom.cmd }}
2019-03-08 11:33:28 +01:00
{% endif %}
{% endfor %}
2018-11-15 15:04:18 +01:00
# vim:ts=4:sw=4