zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <clint@zsh.org>
To: zsh-workers@sunsite.dk
Subject: PATCH: _rubber cleanup finale
Date: Sat, 23 Jul 2005 10:22:15 -0400	[thread overview]
Message-ID: <20050723142215.GA9053@scowler.net> (raw)

Use globbing rather than sed.

Index: Completion/Unix/Command/_rubber
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_rubber,v
retrieving revision 1.2
diff -u -r1.2 _rubber
--- Completion/Unix/Command/_rubber	23 Jul 2005 14:11:03 -0000	1.2
+++ Completion/Unix/Command/_rubber	23 Jul 2005 14:21:15 -0000
@@ -5,12 +5,12 @@
 eval $(rubber --version | sed 's/^.* \([^ ]*\): */_rubber_\1=/')
 if [[ ${_rubber_version#0} != $_rubber_version ]]; then
   _rubber_modules=(
-    $(ls $_rubber_path/rubber/modules | sed -n 's/^\([^_].*\)\.py$/\1/p')
+    $_rubber_path/rubber/modules/[^_]*.py(N:r:t)
   )
 else
   _rubber_modules=(
-    $(ls $_rubber_path/modules | sed -n 's/.rub$//p')
-    $(ls $_rubber_path/rubber/rules/latex | sed -n 's/^\([^_].*\)\.py$/\1/p')
+    $_rubber_path/modules/*.rub(N:r:t)
+    $_rubber_path/rubber/rules/latex/[^_]*.py(N:r:t)
   )
 fi
 


                 reply	other threads:[~2005-07-23 14:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20050723142215.GA9053@scowler.net \
    --to=clint@zsh.org \
    --cc=zsh-workers@sunsite.dk \
    /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).