Skip to content

Instantly share code, notes, and snippets.

@mbadran
Created June 16, 2009 01:30
Show Gist options
  • Save mbadran/130469 to your computer and use it in GitHub Desktop.
Save mbadran/130469 to your computer and use it in GitHub Desktop.
replace cd in bash to (silent) pushd
alias cd="pushd $@ > /dev/null"
@juliyvchirkov
Copy link

juliyvchirkov commented Jun 1, 2021

I've been fond of tuning little things of that kind a lot, it's very exciting sometimes

the last for today - three more functions on topic from my own regular set of /etc/bash.functions

pushd () {
    builtin pushd ${1} >/dev/null 2>&1
}

popd () {
    builtin popd ${1} >/dev/null 2>&1
}

dirs () {
    builtin dirs -v
}

xterm

respect, guys!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment