Bug 680875

Summary: which command print out only the first line of an alias
Product: Red Hat Enterprise Linux 5 Reporter: Tom Molin <tom.molin>
Component: whichAssignee: Than Ngo <than>
Status: CLOSED DEFERRED QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.3CC: pknirsch, tom.molin
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-26 17:37:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Tom Molin 2011-02-28 09:45:09 UTC
Description of problem:
The command which only returns one line when creating a multi-line alias in bash. See example below

Version-Release number of selected component (if applicable):
~ > which --version
GNU which v2.16, Copyright (C) 1999 - 2003 Carlo Wood.

How reproducible:
see below

Steps to Reproduce:
~ > cat test 
alias test='cd /tmp
pwd
cd
pwd
'
~ > source ./test
~ > which test
alias test='cd /tmp
~ >
  
Actual results:
~ > which test
alias test='cd /tmp

Expected results:
~ > which test
alias test='cd /tmp
pwd
cd
pwd
'

Additional info:
the command "alias test" gives the expected result.

Comment 1 Phil Knirsch 2013-03-26 17:37:41 UTC
This request was evaluated by Red Hat Engineering for inclusion in a Red
Hat Enterprise Linux maintenance release.

Red Hat does not currently plan to provide this change in a Red Hat Enterprise
Linux update release for currently deployed products.

With the goal of minimizing risk of change for deployed systems, and in
response to customer and partner requirements, Red Hat takes a conservative
approach when evaluating enhancements for inclusion in maintenance updates
for currently deployed products. The primary objectives of update releases
are to enable new hardware platform support and to resolve critical
defects.

However, Red Hat will further review this request for potential inclusion
in future major releases of Red Hat Enterprise Linux.