Make all aliases optional (a la plugins)

This continues a pattern that was introduced in ffa45b0 and refined
further in later commits.  This enables all aliases by default, but can
be disabled by any user if they remove the appropriate
aliases/enabled/*.bash file.
This commit is contained in:
Travis Swicegood
2011-06-12 19:44:27 -05:00
parent 279b60e26f
commit ef42010c7b
13 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,73 @@
#!/bin/bash
# List directory contents
alias sl=ls
alias ls='ls -G' # Compact view, show colors
alias la='ls -AF' # Compact view, show hidden
alias ll='ls -al'
alias l='ls -a'
alias l1='ls -1'
alias _="sudo"
if [ $(uname) = "Linux" ]
then
alias ls="ls --color=always"
fi
alias c='clear'
alias k='clear'
alias cls='clear'
alias edit="$EDITOR"
alias pager="$PAGER"
alias q="exit"
alias irc="$IRC_CLIENT"
alias rb="ruby"
# Pianobar can be found here: http://github.com/PromyLOPh/pianobar/
alias piano="pianobar"
alias ..='cd ..' # Go up one directory
alias ...='cd ../..' # Go up two directories
alias -- -="cd -" # Go back
# Shell History
alias h='history'
# Tree
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
# Directory
alias md='mkdir -p'
alias rd=rmdir
function aliases-help() {
echo "Generic Alias Usage"
echo
echo " sl = ls"
echo " ls = ls -G"
echo " la = ls -AF"
echo " ll = ls -al"
echo " l = ls -a"
echo " c/k/cls = clear"
echo " .. = cd .."
echo " ... = cd ../.."
echo " - = cd -"
echo " h = history"
echo " md = mkdir -p"
echo " rd = rmdir"
echo " editor = $EDITOR"
echo " pager = $PAGER"
echo " piano = pianobar"
echo " q = exit"
echo " irc = $IRC_CLIENT"
echo " md = mkdir -p"
echo " rd = rmdir"
echo " rb = ruby"
echo
}