Don't display pushd/popd stack across several bash scripts (quiet pushd/popd)

前端 未结 3 1685
野性不改
野性不改 2020-12-29 00:45

Each time I use pushd or popd, it print the stack to standard output. How not to do so?

I don\'t want to do pushd > /dev/null each time because I hav

3条回答
  •  情书的邮戳
    2020-12-29 01:14

    In your .profile file (what ever it is called in your system) add:

    pushd () {
        command pushd "$@" > /dev/null
    }
    
    popd () {
        command popd "$@" > /dev/null
    }
    
    export pushd popd
    

提交回复
热议问题