zsh-users
 help / color / mirror / code / Atom feed
From: Chris Johnson <cjohnson@cs.utk.edu>
To: zsh-users@sunsite.dk
Subject: Re: Redirection Symbol After Completion
Date: Mon, 10 Jul 2006 10:12:20 -0400	[thread overview]
Message-ID: <20060710141220.GA11832@namib.cs.utk.edu> (raw)
In-Reply-To: <060708105612.ZM8718@torch.brasslantern.com>

Bart Schaefer sent me the following 1.9K:

> } > I personally find commands easier to parse with my eye when the space
> } > remains before the redirection symbol:
> } > 
> } >    cat file.txt |
> } > 
> } > Is there any way to force this space to persist even if I type a
> } > redirection operator?
> 
>     self-insert-redir() {
>         integer l=$#LBUFFER
> 	       zle self-insert
> 	       (( $l >= $#LBUFFER )) && LBUFFER[-1]=" $LBUFFER[-1]"
>     }
>     zle -N self-insert-redir
>     for op in \| \< \> \&
>     do bindkey "$op" self-insert-redir
>     done
> 
> I like that so much I might even keep it.

I like it too.  Thanks so much, Bart!

-- 
Chris Johnson
cjohnson@cs.utk.edu
http://www.cs.utk.edu/~cjohnson


  parent reply	other threads:[~2006-07-10 14:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-07 17:32 Chris Johnson
2006-07-08 11:44 ` Peter Stephenson
2006-07-08 17:56   ` Bart Schaefer
2006-07-08 21:44     ` Bart Schaefer
2006-07-10 14:12     ` Chris Johnson [this message]
2006-07-10 23:30       ` Scott Anderson
2006-07-10 23:43         ` Bart Schaefer
2006-07-10 23:53           ` Scott Anderson

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=20060710141220.GA11832@namib.cs.utk.edu \
    --to=cjohnson@cs.utk.edu \
    --cc=zsh-users@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).