+alias sl=ls
+alias ls='ls -G'
+alias la='ls -AF'
+alias ll='ls -al'
+alias l1='ls -1'
+alias l.='ls -d .*'
+
+if [ $OSTYPE != *darwin* ]
+then
+ #alias ls="ls --color=auto"
+ alias ls="command ls $LS_COMMON"
+fi
+
+LS_COMMON="-hF"
+#LS_COMMON="$LS_COMMON -I NTUSER.\* -I ntuser.\*"
+
+# Detect which `ls` flavor is in use
+if whence dircolors > /dev/null 2>&1; then # GNU `ls`
+ eval $(dircolors -b $HOME/.dir_colors)
+ colorflag="--color"
+else # OS X `ls`
+ #eval $(gdircolors $HOME/.dircolors)
+ export CLICOLOR=1
+ colorflag="-G"
+fi
+
+# Shortcuts
+alias g='git'
+alias h='history'
+alias j='jobs'
+alias v='vim'
+alias q='exit'
+alias c='clear'
+alias cls='clear'
+
+alias edit="$EDITOR"
+alias pager="$PAGER"
+
# Easier navigation: .., ..., ...., ....., ~ and -
alias ..="cd .."
alias ...="cd ../.."
alias cp='cp -i'
alias mv='mv -i'
+alias md='mkdir -p'
+alias rd='rmdir'
+
+if [ ! -x "$(which tree 2>/dev/null)" ]
+then
+ alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
+fi
+
alias info='info --vi-keys'
#alias less='less -rX' # raw control characters, don't clear the screen after quitting
alias whence='type -a' # where, of a sort
alias egrep='egrep --color=auto' # show differences in color
alias fgrep='fgrep --color=auto' # show differences in color
-# Shortcuts
-alias g="git"
-alias h="history"
-alias j="jobs"
-
-LS_COMMON="-hF"
-#LS_COMMON="$LS_COMMON -I NTUSER.\* -I ntuser.\*"
-
-# Detect which `ls` flavor is in use
-if whence dircolors > /dev/null 2>&1; then # GNU `ls`
- eval $(dircolors -b $HOME/.dir_colors)
- colorflag="--color"
-else # OS X `ls`
- #eval $(gdircolors $HOME/.dircolors)
- export CLICOLOR=1
- colorflag="-G"
-fi
-
-# Always list colorized
-LS_COMMON="$LS_COMMON $colorflag"
-alias ls="command ls $LS_COMMON"
-
-# List all files excl. dotfiles
-alias l="ls"
-
-# List all files in long format excl. dotfiles
-alias ll="ls -l"
-
-# List all files in long format, incl. dotfiles
-alias la="ls -la"
-
-# List only directories
-alias lsd="ls -l | grep --color=never '^d'"
-
-# List only dotfiles
-alias l.="ls -d .*"
-
# Enable aliases to be sudo'ed
alias sudo='sudo '
+alias _="sudo"
# Get week number
alias week='date +%V'
alias map="xargs -n1"
for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
- alias "$method"="lwp-request -m '$method'"
+ alias "$method"="lwp-request -m '$method'"
done
# Reload the shell (i.e. invoke as a login shell)