Browse Source

Changing list alias for OSX. Adding diff function for listing only one side's changes.

Sam Jaffe 9 years ago
parent
commit
82add37e77
1 changed files with 9 additions and 5 deletions
  1. 9 5
      profile-util

+ 9 - 5
profile-util

@@ -11,7 +11,7 @@ fi
 alias reset-path="export PATH=\"$BASEPATH\""
 
 detach() {
-  for i; do [ -L "$i" ] && cp --remove-destination `readlink "$i"` "$i"; done
+  for i; do [ -L "$i" ] && cp --remove-destination $(readlink "$i") "$i"; done
 }
 
 link-tools() {
@@ -28,7 +28,12 @@ unlink-tools() {
   export LD_LIBRARY_PATH
 }
 
-alias list="ls -lFh --color"
+if [[ $(uname) == "Darwin" ]]
+then # OSX / FreeBSD
+  alias list="ls -lFhG"
+else
+  alias list="ls -lFh --color"
+fi
 alias listall="list -A"
 alias git-graph="git log --graph --pretty=oneline --abbrev-commit --decorate --all"
 alias disk-usage="ls -A | xargs du -shc | sort -h"
@@ -44,8 +49,6 @@ refreshterm() {
   list
 }
 
-export EDITOR=/home/user/wreed/bin/vim
-
 _mkcd_fun() {
   if [ ! -d "$2" ]; then
     if [ -e "$2" ]; then
@@ -65,6 +68,7 @@ mkdirs() {
 alias mkcds="_mkcd_fun mkdirs_fun"
 
 alias diffr="diff --ignore-blank-lines --minimal --side-by-side --report-identical-files --suppress-common-lines"
+alias diffl="diff --changed-group-format='%<' --unchanged-group-format=''"
 
 _recall_fun() {
   if [ -z "$1" ]; then echo "recall: usage: recall string"; return 1; fi
@@ -92,7 +96,7 @@ recall(){
   _recall_fun $1 | sed 's/^/  /'
 }
 
-alias coms="~sjaffe/tools/comstore/commands.sh"
+alias coms="${HOME}/tools/comstore/commands.sh"
 
 source ${HOME}/.profile-p4