Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Quote components before using it is pattern
- X-seq: zsh-workers 28184
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: [PATCH] Quote components before using it is pattern
- Date: Sat, 21 Aug 2010 09:54:10 -0700
- In-reply-to: <AANLkTimzOEX5ZvUorwx2UsvT2u+YjDfER6Gt6E1CZMvL@xxxxxxxxxxxxxx>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1223938893-2537-1-git-send-email-joerg@xxxxxxxxxxxx> <20081014150144.GA3836@xxxxxxxxxxxx> <AANLkTimzOEX5ZvUorwx2UsvT2u+YjDfER6Gt6E1CZMvL@xxxxxxxxxxxxxx>
On Aug 21, 2:46pm, Mikael Magnusson wrote:
} Subject: Re: [PATCH] Quote components before using it is pattern
}
} On 14 October 2008 17:01, Jorg Sommer <joerg@xxxxxxxxxxxx> wrote:
Wow, digging back into history a bit here ...
} >> A component might contain a character active in patterns, like * or ().
} >>
} >> The characters in the temporary variable tmp1 must be quote, before the
} >> pattern is build with them.
}
} This patch sort of breaks completing when the first segment has spaces
} for me.
As has come up elsewhere, the problem is that ${(q)...} is a bit too
aggressive for the purpose to which it is being put. We need to quote
pattern characters in tmp1, but not other characters like spaces.
There's a rather ugly hunk of code in _path_files that does something
like this (see the comment "Explanation of substitution: ...") but
unfortunately I don't have time this morning to try to adapt it for
_multi_parts.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author