Bug 688253 - Embedded Commnad "unset" fails to unset function which name comprises '-'
Summary: Embedded Commnad "unset" fails to unset function which name comprises '-'
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bash
Version: 6.1
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Roman Rakus
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-16 16:39 UTC by Dimitar Yordanov
Modified: 2014-01-13 00:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-03-16 17:24:21 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Dimitar Yordanov 2011-03-16 16:39:37 UTC
Description of problem:
Embedded Commnad "unset" fails to  unset function which name comprises '-'

Version-Release number of selected component (if applicable):
bash-4.1.2-8.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1.function a(){
echo a
}

2.unset a

3.function a-a(){
echo "a-a"
}

4.#unset a-a

Actual results:
-bash: unset: `a-a': not a valid identifier


Expected results:
Success.

Additional info:

Comment 2 Roman Rakus 2011-03-16 17:18:13 UTC
You can use `unset -f'.

Comment 3 Roman Rakus 2011-03-16 17:24:21 UTC
You can see discussion upstream http://www.mail-archive.com/bug-bash@gnu.org/msg03329.html
Mainly the answer from upstream maintainer http://www.mail-archive.com/bug-bash@gnu.org/msg03334.html

Closing as not a bug


Note You need to log in before you can comment on or make changes to this bug.