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
L3D 0e9269f7e7
improve role behavior (#2)
* Resolve linting warnings

* rebuild role structure and add more bash options

* Add github action tasks

* fix typo

* fix another typo

* fix another typo

* fix another typo

* fix another typo

* fix another typo

* fix another typo

* Improve default values

* create optional bashrc for users
2020-11-13 11:30:51 +01:00

44 lines
1,011 B
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 base__aliases %}
{% if alias.color %}
alias {{ alias.alias }}="{{ alias.command }} --color=auto"
{% endif%}
{% endfor %}
fi
{% for alias in base__aliases %}
{% if not alias.color %}
alias {{ alias.alias }}="{{ alias.command }}"
{% endif%}
{% endfor %}
# hostory controll
HISTCONTROL={{ base__history_control }}
shopt -s histappend
HISTSIZE={{ base__history_size }}
HISTFILESIZE={{ base__history_file_size }}
{% for _row in base__additional_user_bashrc_lines | default() %}
{{ _row }}
{% endfor %}
{% for custom in base__custom_config %}
{% if custom.user == item %}
{{ custom.cmd }}
{% endif %}
{% endfor %}
# vim:ts=4:sw=4