zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Xavier Martinez Serrano <xmarti6@xtec.cat>, zsh-workers@zsh.org
Subject: Re: zsh Issue - "!~ " character is not pasted into shell, insted I get "~/.ssh/config"
Date: Wed, 21 Sep 2016 10:36:10 -0700	[thread overview]
Message-ID: <160921103610.ZM3018@torch.brasslantern.com> (raw)
In-Reply-To: <CAPYyywhC2qMKpodNZyH1toFKhVDYRpiKkDyOSBR0RT81K+a-5A@mail.gmail.com>

On Sep 21,  4:27pm, Xavier Martinez Serrano wrote:
}
} I'm using zsh 4.3.17 (x86_64-unknown-linux-gnu)" version
} and when I was developing some small awk codes, I tried to paste
} them to the terminal, but when I used the operator "!~ " I realised
} that, when pasting, zsh translated it to "~/.ssh/config". Quite annoying

"!" is the history reference character, so !~ means to search for a
history event beginning with a tilde and substitute that event into
the command at that position.

Apparently somewhere in your command history you typed ~/.ssh/config
at the beginning of a line, and now !~ is finding that as the history
event to substitute.

You can "setopt NO_BANG_HIST" to disable this, or you can use single
quotes '!~' to prevent the expansion (double quotes permit it).

It's additinally possible that your /etc/z* files or some other init
file have attached the magic-space widget to the space character.
This causes !-history references to IMMEDIATELY expand when followed
by a space, even a space originating from copy-paste (at your version
number; behavior of paste has changed in very recent zsh).


      reply	other threads:[~2016-09-21 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-21 14:27 Xavier Martínez Serrano
2016-09-21 17:36 ` Bart Schaefer [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=160921103610.ZM3018@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=xmarti6@xtec.cat \
    --cc=zsh-workers@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).