Skip to content

Commit

Permalink
Adding canonicalise function to .bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
markhepburn committed Aug 27, 2010
1 parent f1d8b7c commit a85b72f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .bashrc
Expand Up @@ -154,5 +154,12 @@ function fix_ssh_agent() {
unset SOCKFILE
}

function canonicalise {
local dirpart=`dirname $1`
cd $dirpart && pwd -P
}
# used in scripts, so we export this:
export -f canonicalise

export PATH

0 comments on commit a85b72f

Please sign in to comment.