Skip to main content
why did I write this unsollicited answer
Source Link
athena
  • 1.1k
  • 7
  • 24

The easy answer to the real functionnal need ( hidden behind the OQ ) :

How to make cd behave as cd + pushd, could be:

cd () { pushd -q "$@" ; }

The -q will avoid the unwanted printing of the directories stack. As a side effect, this will work for absolute and relative pathes and will be slightly more efficient and clear.

The easy answer to the real functionnal need ( hidden behind the OQ ) could be:

cd () { pushd -q "$@" ; }

The -q will avoid the unwanted printing of the directories stack. As a side effect, this will work for absolute and relative pathes and will be slightly more efficient and clear.

The easy answer to the real functionnal need ( hidden behind the OQ ) :

How to make cd behave as cd + pushd, could be:

cd () { pushd -q "$@" ; }

The -q will avoid the unwanted printing of the directories stack. As a side effect, this will work for absolute and relative pathes and will be slightly more efficient and clear.

Source Link
athena
  • 1.1k
  • 7
  • 24

The easy answer to the real functionnal need ( hidden behind the OQ ) could be:

cd () { pushd -q "$@" ; }

The -q will avoid the unwanted printing of the directories stack. As a side effect, this will work for absolute and relative pathes and will be slightly more efficient and clear.