diff --git a/.bashrc b/.bashrc index 7e13278..1cd82d3 100644 --- a/.bashrc +++ b/.bashrc @@ -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