tcsh variable substring replacement broken

Bug #1716157 reported by Leon van Dommelen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tcsh (Ubuntu)
New
Undecided
Unassigned

Bug Description

$variable:[ga]s/string1/string2/ does not work as described

Minimal example:

set a='1'
echo "${a:as/1/11/}"

Hangs. (I assume it keeps replacing 1 by 11.)

Minimal example:

# & does not generate string1 and cannot be escaped:
set a='1&'
echo "a: $a:s/1&/\&1/" # produces '\&1', not '&1'
echo "a: $a:s/1&/&1/" # produces '&1', not '1&1'

Minimal example:

# cannot escape the delimiter:
set a='1/'
echo "a: $a:s/1\//\/1/" # produces '1/\/1/', not '/1'

Xubuntu 16.04 LTS, tcsh 6.18.01-5. (But I think I saw this bug before.)

No effect of echo_style, backslash_quote variables.

Revision history for this message
Leon van Dommelen (dommelen) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.