Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
egrep --color=always 'zsh\.'
- X-seq: zsh-users 29763
- From: Ray Andrews <rayandrews@xxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: egrep --color=always 'zsh\.'
- Date: Tue, 2 Apr 2024 09:33:05 -0700
- Archived-at: <https://zsh.org/users/29763>
- List-id: <zsh-users.zsh.org>
% apt-file search zsh. | egrep
--color=always 'zsh\.'
... if using egrep, the above makes sure that the dot is taken
literally. I have a function that ends up trying to create the
above:
% func 'zsh\.'
... which will attempt:
apt-file search "$1" | egrep
--color=always $1
... and it works fine unless I want to
force a literal char, as above. zsh is removing the quotes as she
properly does, but in this case I need to preserve them since
egrep needs them. I know I've done this before. Something in the
(Q) continuum? It has to be egrep since I normally want the regex
interpretation, it's just this odd case where I need a regex char
forced literal. I know it's doable.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author