zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: Zsh Users <zsh-users@zsh.org>
Subject: egrep --color=always 'zsh\.'
Date: Tue, 2 Apr 2024 09:33:05 -0700	[thread overview]
Message-ID: <7318f96a-c6ff-426b-aa64-93b8ea6ee9c1@eastlink.ca> (raw)

[-- Attachment #1: Type: text/plain, Size: 724 bytes --]

     % 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.




[-- Attachment #2: Type: text/html, Size: 1167 bytes --]

             reply	other threads:[~2024-04-02 16:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-02 16:33 Ray Andrews [this message]
2024-04-02 20:14 ` Lawrence Velázquez
2024-04-02 20:53   ` Ray Andrews
2024-04-02 22:45     ` Lawrence Velázquez
2024-04-02 22:55       ` Bart Schaefer
2024-04-02 23:29         ` Ray Andrews
2024-04-03  8:18         ` Lawrence Velázquez
2024-04-02 23:26       ` Ray Andrews
2024-04-03  3:42   ` Mark J. Reed
2024-04-03 12:50     ` Ray Andrews

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7318f96a-c6ff-426b-aa64-93b8ea6ee9c1@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).