
Untitled
By: a guest on
Aug 19th, 2012 | syntax:
None | size: 0.99 KB | hits: 5 | expires: Never
function od() {
if [ $# != 0 ]; then
if [ -e $1 ]; then
cd $1;
echo "moved : "$'\x1b[33m'`pwd`$'\x1b[0m';
# add log
python ~/lab/py/cdhist/cdhist.py `pwd`;
ls -GwF;
elif [ $1 = "-s" ]; then
if [ $# = 2 ]; then
cd $(python ~/lab/py/cdhist/suggest_directory.py $2)
echo "moved : "$'\x1b[33m'`pwd`$'\x1b[0m';
# add log
python ~/lab/py/cdhist/cdhist.py `pwd`;
ls -GwF;
elif [ $# = 1 ]; then
python ~/lab/py/cdhist/suggest_directory.py
fi
else
echo "no such a file or directory :"$1;
fi
else
tail ~/.cd_history
fi
}