templier-ansible/roles/cli-utils/templates/bash_aliases.j2
Yohann D'ANELLO 1d1b31c461
Remove some bash aliases on servers
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
2021-04-08 10:34:52 +02:00

57 lines
1.3 KiB
Django/Jinja

#!/bin/bash
{{ ansible_header | comment }}
# 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)"
alias ls='ls --color=auto'
alias grep='grep --color=always'
alias fgrep='fgrep --color=always'
alias egrep='egrep --color=always'
fi
# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias cd='cd -P'
alias ip='ip -c'
alias less='less -R'
{% if ansible_os_family == "Archlinux" -%}
alias startx='exec startx'
{% endif %}
alias gst='git status -s'
alias proxy='ssh -q -C -N -D 8080'
alias wip='watch -c ip -c'
# Shortcuts to open ports
alias ldap_tealc="ssh -L 1636:tealc.adm.crans.org:636 tealc.adm.crans.org"
alias sam="ssh -L 8006:sam.adm.crans.org:8006 sam.adm.crans.org"
alias jack="ssh -L 8006:jack.adm.crans.org:8006 jack.adm.crans.org"
alias daniel="ssh -L 8006:daniel.adm.crans.org:8006 daniel.adm.crans.org"
alias vi=vim
{% if ansible_os_family == "Debian" -%}
alias bat=batcat
{% endif -%}
alias cat=bat
# Add some emoji aliases
alias 🦇=bat
alias 🐈=cat
alias 🚆=sl
alias 🚂=sl
alias 🚅=sl
alias 💿=cd
{% if ansible_os_family == "Archlinux" -%}
{# Personal computer #}
alias 🐿️="cd /home/ynerant/PycharmProjects/SquirrelBattle && venv/bin/python main.py"
{% endif -%}