More bashing
April 04, 2003
Thanks to my brother Steve, I was able to get my backtracking cd to the way I wanted it to
Just add the following to your ~/.bashrc or if you want to make this work system wide add this to /etc/bashrc:
#redefine pushd and popd so they don't output the directory stack
pushd()
{
builtin pushd "$@" > /dev/null
}
popd()
{
builtin popd "$@" > /dev/null
}
#alias cd so it uses the directory stack
alias cd='pushd'
#aliad cdb as a command that goes one directory back in the stack
alias cdb'popd'
The redefinition of pushd and popd redirects their output to /dev/null instaed of your terminal. This prevents them from displaying the entire stack every time they are called
Tweet
Trackbacks
Trackback Address: 65/BD96B25EB3297B06C2047F57763A2B44
Comments
On 01/14/2006 at 2:13:45 PM EST goats wrote:
1
13c13 < alias cdb'popd' --- > alias cdb='popd'
Post a Comment
Recent Entries
- Nginx redirect www to non www domain
- HashDOS and ColdFusion
- HackMyCF Updated for APSB11-29 Security Hotfix
- Adobe eSeminar on FuseGuard
- Determining Which Cumulative Hotfixes are Installed on ColdFusion
- Adding Two Factor Authentication to ColdFusion Administrator
- ColdFusion Developer Week at Adobe.com
- Bug Loading Scripts for CFFileUpload and CFMediaPlayer


add to del.icio.us


