Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I am using follow function for cd which does basically the same though i can iterate through the last arguments with alt+.

    cd () {
	if [[ -f $1 ]]
 	then
		builtin cd $1:h
    	else
    		builtin cd "$@"
    	fi
    }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: