Red Hat Bugzilla – Bug 21134
tcsh trys to expand filename metacharacters when it shouldn't
Last modified: 2007-04-18 12:29:57 EDT
tcsh tries to expand filename metacharacters when it shouldn't (e.g.
when using scp.
rangek@nf00 [~/Projects/new_cpks/H2S_only_B] % scp pinot-noir:* .
scp: No match.
But in bash:
[rangek@nf00 H2S_only_B]$ scp pinot-noir.chem.umn.edu:* .
And everything proceeds as expected, (i.e., the * is expanded by the
shell on pinot-noir, not on nf00).
It seems like bash is smart enough to see the machine:path syntax and
not expand it, while tcsh blindly tries to expand the filename
metacharacters, when by their very nature (refering to another machine)
they cannot be.
This is consistent with the behavior for tcsh on the other platforms I've used
it on. The shell attempts to glob any expression with metacharacters in it,
regardless of whether or not it contains a colon (it could just as well be a set
of files which start with "pinot-noir.chem.umn.edu:").
If this is not the desired behavior, you can either quote the pattern or use
either the "noglob" or "nonomatch" shell variables to customize the behavior.