pf » More bashing
April 03, 2003
More bashing
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
Trackback Address: 65/BD96B25EB3297B06C2047F57763A2B44
Comments
On 01/14/2006 at 12:13:45 PM MST goats wrote:
1
13c13 < alias cdb'popd' --- > alias cdb='popd'
- ColdFusion 8 FCKeditor Vulnerability
- Ajax Same Origin Policy No More with Firefox 3.5
- Firefox 3.5 Introduces Origin Header, Security Features
- Tips for Secure File Uploads with ColdFusion
- 7 Years And Blog Entry Number 700
- CFCatch Java Exceptions
- Cheat Sheet for SQL Server
- CFML on Google App Engine for Java
Subscribe to my RSS Feed:
RSS
RSS
add to del.icio.us
Pete Freitag is a software engineer, and web developer located in











