Zsh Mailing List Archive
Messages sorted by:
Re: zsh Issue - "!~ " character is not pasted into shell, insted I get "~/.ssh/config"
- X-seq: zsh-workers 39402
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Xavier Martinez Serrano <xmarti6@xxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: zsh Issue - "!~ " character is not pasted into shell, insted I get "~/.ssh/config"
- Date: Wed, 21 Sep 2016 10:36:10 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=D3iReH4wSp4HUYTHcCfyEYUza8abkiDMu3l8w4RuEs4=; b=uCOJYZpXN2Hqaz194qGbXGo1HHxAf7Ai7Ukre6LEluP5z68iX6wJhTw85lObN4/mbN nfSeogM1oNMMTKYWoYuLeaoZYX/NsejdeQz1kJQKhTUq5UJeyFO1+XaVrQ2YBioQKInq iKbwiYi6DeAyV4I1flnPT5qg0XK9KD/IMAAJVy/DIu3kWiu4UKAAJucYT7DAgM+gGTGb Fo8Q3rL4AeSW+nR0gayDUQlwtuqdUrABpGMefxtPw6lBVQFBR/wqokI5xxsU6Z9EW3kJ wo+iQTf490zHNj5Dm1JzMEynC6xC7P6+MfB2xm39O92IutcZILIy84InUV5RLa27R7Sm Dzzw==
- In-reply-to: <CAPYyywhC2qMKpodNZyH1toFKhVDYRpiKkDyOSBR0RT81K+a-5A@mail.gmail.com>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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).
Messages sorted by: