Re: not found (:del)
Bram Moolenaar <[email protected]> Sat, 18 Feb 2006 14:58:51 +0100
| Newsgroups | gmane.comp.tools.aap.devel |
|---|---|
| Message-ID | <[email protected]> |
Calmar wrote:
> | :del $(target).tmp
> I think the :del $(target).tmp does not really work as expected, or doe=
s it?
> Also (in the same manner), when I place there a :print $(target).tmp, I=
get:
>=20
> index.php{publish=3Dftp://n4b244:[email protected]/html/bcr-test/%file%}=
.tmp
>=20
> (I would expect: `index.php.tmp' instead)
Indeed, for the ":del" command attributes should not be included when
expanding a variable.
> When I use e.g: tmp_$(target) instead of $(target).tmp or however, it
> seems to work.
Yes, then the attribute is separate and is ignored. You can also use
$-(target).tmp
> So :del and :print seems to use (add the suffix) the file including
> the attribute.
>=20
> (btw: the :cat statement seems to use $(target).tmp as expeced, and
> produces the files)
The default way to expand a variable depends on the context. Sometimes
the attributes are desired, sometimes they are not. I'll change ":del"
to exclude the attributes.
--=20
ROBIN: The what?
ARTHUR: The Holy Hand Grenade of Antioch. 'Tis one of the sacred relics
Brother Maynard always carries with him.
ALL: Yes. Of course.
ARTHUR: (shouting) Bring up the Holy Hand Grenade!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURE=
S LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \=
\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ =
\\\
\\\ download, build and distribute -- http://www.A-A-P.org =
///
\\\ help me help AIDS victims -- http://www.ICCF.nl /=
//
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi=
les
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat=3D=
121642