Bug 435421 - '\' can not be used to quote all delimiters.
Summary: '\' can not be used to quote all delimiters.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: tcsh
Version: 5.1
Hardware: i686
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Vitezslav Crhonek
QA Contact: Bill Huang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-29 08:26 UTC by Cai Xianchao
Modified: 2008-04-23 09:28 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-04-23 09:28:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
This is a patch fixing the bug. (725 bytes, application/octet-stream)
2008-02-29 08:26 UTC, Cai Xianchao
no flags Details

Description Cai Xianchao 2008-02-29 08:26:02 UTC
Description of problem:

Version-Release number of selected component (if applicable):
Manpage says that "a‘\’ can be used to quote the delimiter inside l and r." But,
'\' can not be used to quote the delimiter '(', ')', '|' and '>'.

How reproducible:


Steps to Reproduce:
1.[test@RHEL5 ~]$ set test=(ab cd)
2.[test@RHEL5 ~]$ echo $test:s(\(a(A(
Too many ('s.
3.[test@RHEL5 ~]$ echo $test:s)\)a)A)
Too many )'s.
4.[test@RHEL5 ~]$ echo $test:s|\|a|A|
Invalid null command.
5.[test@RHEL5 ~]$ echo $test:s>\>a>A>
Missing name for redirect.
  
Actual results:
The substitution fails and error messages are outputed.

Expected results:
'a' is replaced by 'A'.

Additional info:

Comment 1 Cai Xianchao 2008-02-29 08:26:02 UTC
Created attachment 296314 [details]
This is a patch fixing the bug.

Comment 2 Vitezslav Crhonek 2008-02-29 12:53:08 UTC
Thanks for report and patch!
Fixed in Fedora rawhide.

Comment 3 Vitezslav Crhonek 2008-04-23 09:28:35 UTC
I've reopened the bug.

1.[test@RHEL5 ~]$ set test=(ab cd)
Fine. But note:
[vcrhonek@norcus ~]$ echo $test
ab cd
Braces are not part of variable, they are used because variable contains white
space.
set  var = (str1 str2 str3) define shell variable with value consisting of
multiple strings.

2.[test@RHEL5 ~]$ echo $test:s(\(a(A(
Wrong. There's no "(a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s(a(A(
Ab cd

3.[test@RHEL5 ~]$ echo $test:s)\)a)A)
Wrong. There's no ")a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s)a)A)
Ab cd

4.[test@RHEL5 ~]$ echo $test:s|\|a|A|
Wrong. There's no "|a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s|a|A|
Ab cd

5.[test@RHEL5 ~]$ echo $test:s>\>a>A>
Missing name for redirect.
Wrong. There's no ">a" to be replaced with "A".
[vcrhonek@norcus ~]$ echo $test:s>a>A>
Ab cd

Note this:
[vcrhonek@norcus ~]$ set test = ( ab\> cd )
[vcrhonek@norcus ~]$ !:s(\((X(:p
set test = X ab\> cd )

[vcrhonek@norcus ~]$ set test = ( ab > cd )
[vcrhonek@norcus ~]$ !:s>\>>X>:p
set test = ( ab X cd )

So everything works correctly, changing resolution to NOTABUG and man page will
be fixed back in Fedora.


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