Chet Ramey wrote:
On 4/18/17 9:35 AM, Eduardo Bustamante wrote:
Or now that I think about it, you can get away with these functions:
# masked builtins
dualbus@debian:~/foo/bar/baz$ pushd() { builtin pushd "$@" >/dev/null;
dirs -v; }; popd(){ builtin popd "$@" >/dev/null; dirs -v; }
This would be the preferable alternative, since it's so trivial. The one
change I would suggest would be to make the `;' a `&&':
pushd()
{
builtin pushd "$@" >/dev/null && dirs -v
}
Maybe add 'builtin' before "dirs" since we're redefining builtins
(i.e. get into habit?)
(Ms. "Shoot-1st, then aim")