zsh-users
 help / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Sylvia Gough <q0h8xdveje@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: Getting the command in preexec as precisely typed
Date: Sun, 2 Jun 2019 18:03:22 +0200
Message-ID: <CAKc7PVDPVj3_DhJhCYo-LhZEGxLmzpeoE+50t8ficzdPzra9Bw@mail.gmail.com> (raw)
In-Reply-To: <CA+E8bhofxWgV+BG+a2p8wN3dy6VjLX28EAeH=DXM7LWHH63h9Q@mail.gmail.com>

On Sun, 2 Jun 2019 at 16:47, Sylvia Gough <q0h8xdveje@gmail.com> wrote:
> ...
> Now if I type `echo \b` the string `echo ^H$` is printed (i.e. `\b` was
> replaced by `^H`).
> This does not happen when using `fc -nl -1`.
>
> How  can I get the same inside `preexec`?
>
> Thanks!

It is the echo in the hook that does the conversion \b -> ^H. Use -E
option with echo to prevent this.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

  reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-02 14:45 Sylvia Gough
2019-06-02 16:03 ` Sebastian Gniazdowski [this message]
2019-06-02 21:22   ` Sylvia Gough
2019-06-03  9:26     ` Roman Perepelitsa
2019-06-03  9:39       ` Sylvia Gough

Reply instructions:

You may reply publically 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=CAKc7PVDPVj3_DhJhCYo-LhZEGxLmzpeoE+50t8ficzdPzra9Bw@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=q0h8xdveje@gmail.com \
    --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

zsh-users

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox