Add bash configuration files

This commit is contained in:
xavier
2013-04-24 16:58:31 +02:00
parent 1849cd96a2
commit 9fad99b12f
30 changed files with 570 additions and 0 deletions

8
aliases.d/colors Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# Colors
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias less='less -R'

4
aliases.d/fun Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
# Fun
alias matrix='tr -c "[:digit:]" " " < /dev/urandom | dd cbs=$COLUMNS conv=unblock | GREP_COLOR="1;32" grep --color "[^ ]"'

8
aliases.d/generic Normal file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# Cd
alias cdup='cd ..'
# Ls
alias ll='ls -lh'
alias lla='ls -lha'

17
aliases.d/git Normal file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Git
if [ -x /usr/bin/git ]
then
alias gs='git status'
alias ga='git add'
alias gc='git commit'
alias gca='git commit -a'
alias gp='git push'
alias gu='git pull'
alias gd='git diff'
alias gb='git branch'
alias gco='git checkout'
alias gw='git whatchanged'
alias gl='git log --graph'
fi

6
aliases.d/power Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# Power
alias reboot='sudo reboot'
alias halt='sudo halt'
alias shutdown='sudo shutdown'

6
aliases.d/security Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# Security
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'

4
aliases.d/ssh Normal file
View File

@ -0,0 +1,4 @@
#!/bin/bash
# SSH
alias ssh!='ssh -q -oStrictHostKeyChecking=no -oIdentitiesOnly=yes'

5
aliases.d/system Normal file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# System tools
if [ -f /sbin/ifconfig ] && [ -x /sbin/ifconfig ]; then alias ifconfig='/sbin/ifconfig'; fi
if [ -f /sbin/ip ] && [ -x /sbin/ip ]; then alias ip='/sbin/ip'; fi

9
aliases.d/vim Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# Vim Editor
if [ -x /usr/bin/vim ]
then
alias vi='vim -p'
alias view='vim -R'
alias vless='vim -u /usr/share/vim/vim73/macros/less.vim'
fi