|
From: | L A Walsh |
Subject: | Re: Issus with popd and pushd |
Date: | Tue, 18 Apr 2017 11:13:12 -0700 |
User-agent: | Thunderbird |
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")
[Prev in Thread] | Current Thread | [Next in Thread] |