zsh-users
 help / color / mirror / code / Atom feed
From: shawn wilson <ag4ve.us@gmail.com>
To: "Benjamin R. Haskell" <zsh@benizi.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: pipe every command
Date: Mon, 5 Nov 2012 17:22:49 +0000	[thread overview]
Message-ID: <CAH_OBief_5pNqE+GkaAG1=JRFZ2CPaVPUhtA4=spF9nqYAH1bQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.LNX.2.01.1211050949320.24430@hp.internal>

On Mon, Nov 5, 2012 at 3:03 PM, Benjamin R. Haskell <zsh@benizi.com> wrote:
> On Mon, 5 Nov 2012, shawn wilson wrote:
>
>> is there a way to put every command through a pipe or redirect?
>>
>> i'd prefer some way that i can put logic in so that i can exclude some
>> commands. but, basically i want everything to go through 'source-highlight'
>> so:
>> ps ax | grep ssh
>> will end up:
>> ps ax | grep ssh | source-highlight -f esc256 -s shell
>>
>> and:
>> sa
>> would end up:
>> sa | source-highlight -f esc256 -s shell
>
>
> There might be a way to do this in the way you're talking about, but I
> accomplish a similar goal (being able to easily pipe things through `less`)
> using global aliases:
>
> alias -g L='| less'
>
> You could use:
>
> # H = highlight
> alias -g H='| source-highlight -f esc256 -s shell'
>

not as nicely baked in as i was hoping, but i guess it'll work. thanks


      reply	other threads:[~2012-11-05 17:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-05  8:23 shawn wilson
2012-11-05 15:03 ` Benjamin R. Haskell
2012-11-05 17:22   ` shawn wilson [this message]

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='CAH_OBief_5pNqE+GkaAG1=JRFZ2CPaVPUhtA4=spF9nqYAH1bQ@mail.gmail.com' \
    --to=ag4ve.us@gmail.com \
    --cc=zsh-users@zsh.org \
    --cc=zsh@benizi.com \
    /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).