ash: respect -p flag when command builtin is run with -v/-V
authorRon Yorston <rmy@pobox.com>
Mon, 3 Aug 2015 12:47:33 +0000 (13:47 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 29 Oct 2015 19:05:32 +0000 (20:05 +0100)
commit3f221113a50196e536bfb059712915bd8bde10d1
tree319146f044bb965fb2bd4f5d88675be0d305ef42
parente2f32c02b149f5a128c634231a0ef12d03843967
ash: respect -p flag when command builtin is run with -v/-V

The command builtin should only check the default path, not $PATH,
when the -p flag is used along with -v/-V.

Based on commits 65ae84b (by Harald van Dijk) and 29ee27d (by Herbert
Xu) from git://git.kernel.org/pub/scm/utils/dash/dash.git).

function                                             old     new   delta
commandcmd                                            72      87     +15
describe_command                                     437     450     +13
typecmd                                               84      86      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 30/0)               Total: 30 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
shell/ash.c
shell/ash_test/ash-misc/command.right [new file with mode: 0644]
shell/ash_test/ash-misc/command.tests [new file with mode: 0755]