1 2 3 4 5 6 7 8
function cdl() { if [ $# == 0 ] || [ ! -L $1 ]; then echo usage: cdl \[LINK\] else cd $1(:A:h) fi }