Skip to content

Instantly share code, notes, and snippets.

@aheadlead
Created January 1, 2016 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aheadlead/56377b1c0cbdee1e7549 to your computer and use it in GitHub Desktop.
Save aheadlead/56377b1c0cbdee1e7549 to your computer and use it in GitHub Desktop.
# 快速往上 cd ..
# cd .. ; cd .. ; cd .. 等同于 cdj 3
function cdj {
CDJUMP_LAST_PWD=`pwd`
for (( i=0; i<$1; i++ ))
do
cd ..
echo "Jump to `pwd`"
done
}
# 3 天后 updated: 如果你数错了要跳多少层的话...试试 cdj_fuck
function cdj_fuck {
cd ${CDJUMP_LAST_PWD}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment