Permalink
Browse files

Migrating my old profile here. Separating aliases. Adding duf.

  • Loading branch information...
1 parent a24a7f4 commit fcc80275f735bd847326a2b9918efd2645527f15 @spf13 committed May 5, 2010
Showing with 58 additions and 5 deletions.
  1. +7 −0 Darwin/aliases.conf
  2. +5 −0 Darwin/duf.conf
  3. +6 −0 Linux/aliases.conf
  4. +4 −0 Linux/duf.conf
  5. +5 −1 README.textile
  6. +9 −0 aliases.conf
  7. +1 −3 environment.conf
  8. +21 −0 extract.conf
  9. +0 −1 z_oldprofile.conf
View
@@ -0,0 +1,7 @@
+# Real trashing FTW
+alias trash="mv $1 ~/.Trash"
+alias eject='drutil eject 0'
+alias du0='duf -d 0'
+alias du1='duf -d 1'
+alias du2='duf -d 2'
+
View
@@ -0,0 +1,5 @@
+# osx has a different du than linux.
+function duf {
+ du -k "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done
+}
+
View
@@ -0,0 +1,6 @@
+alias ls='ls --color=always -Fhp'
+alias la='ls -A'
+alias ll='la -l'
+alias du0='duf --max-depth=0'
+alias du1='duf --max-depth=1'
+alias du2='duf --max-depth=2'
View
@@ -0,0 +1,4 @@
+function duf {
+ du -k "$@" | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done
+}
+
View
@@ -18,9 +18,13 @@ h2. Features
* Integration with "CDArgs":http://www.skamphausen.de/cgi-bin/ska/CDargs
* "Autojump":http://wiki.github.com/joelthelion/autojump/
-h3. Enhancements
+h3. SPF13 Enhancements
* Bundling a bin directory so that autojump, etc work out of the box.
* Tab completion for "git flow":http://github.com/nvie/gitflow
+* Extract (xt: extract all common compressions)
+* A better du (duf: du ordered by size)
+* Common bash aliases
+* Separate aliases for Linux and OS X
h2. What's it look like?
View
@@ -0,0 +1,9 @@
+alias rsync='rsync -v --progress --partial'
+alias less="less -R"
+alias qlf='qlmanage -p "$@" >& /dev/null'
+alias q='exit'
+alias mkdir='mkdir -p' # Make mkdir recursive
+alias cdd='cd - ' # goto last dir cd'ed from
+alias df='df -kH'
+alias grep='grep --color=auto'
+alias xt='extract'
View
@@ -1,13 +1,11 @@
[ -n "$PS1" ] && bind "set completion-ignore-case on"
export RSYNC_RSH="ssh"
-alias rsync='rsync -v --progress --partial'
-
-alias less="less -R"
export PYTHONSTARTUP="$HOME/.pythonrc.py"
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;32'
+export CLICOLOR='yes'
# Returns 0 (success) if the pwd is tracked, otherwise 1 (failure).
git_pwd_is_tracked() {
View
@@ -0,0 +1,21 @@
+function extract() {
+ if [ -f $1 ] ; then
+ case $1 in
+ *.tar.bz2) tar xvjf $1 ;;
+ *.tar.gz) tar xvzf $1 ;;
+ *.bz2) bunzip2 $1 ;;
+ *.rar) unrar x $1 ;;
+ *.gz) gunzip $1 ;;
+ *.tar) tar xvf $1 ;;
+ *.tbz2) tar xvjf $1 ;;
+ *.tgz) tar xvzf $1 ;;
+ *.zip) unzip $1 ;;
+ *.Z) uncompress $1 ;;
+ *.7z) 7z x $1 ;;
+ *) echo "'$1' cannot be extracted via >extract<" ;;
+ esac
+ else
+ echo "'$1' is not a valid file"
+ fi
+}
+
View

0 comments on commit fcc8027

Please sign in to comment.