Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug report: segfault when pasting (function and alias names collide)
- X-seq: zsh-workers 40276
- From: Victor Volle <victor.volle@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Bug report: segfault when pasting (function and alias names collide)
- Date: Thu, 5 Jan 2017 17:21:03 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beta-thoughts.org; s=beta-thoughts; h=mime-version:from:date:message-id:subject:to; bh=5Qm7CkN284GV4eALwJ6LlSpVQ2Z6AtdPPH4PaLB22GQ=; b=CUotQLW74+oPqE2LhWeOmIA7f97WgqQR2QNPNm3njNctUMH4IdKo1w3Rl0Kb7UC3TR VKM182DdE/BBX11WMpXWAtoYBLfxVI2+Eed6WB1pKcjTqIHLcI0ryefPEubGBim6A26C pmyGV5iLT1jU9q/VdX5DlsvwyBT+ORaH/Mh6k=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
I think this may already have been reported in 2010:
https://www.zsh.org/mla/workers/2010/msg00521.html
but it does not seem to be fixed.
The solution is simple enough, but in my case it was triggered whenever I
pasted something
in the Terminal, so it was rather difficult to find the cause.
I defined a function 'h' (in my .zshrc):
h() {
pattern="$1"
if [[ -z "$pattern" ]]; then
fc -n -l 1
else
if [[ $pattern =~ '[*]' ]]; then
fc -n -l -m "${pattern}" 1
else
fc -n -l -m "*${pattern}*" 1
fi
fi
}
without unaliasing 'h' before (which is defined in the 'history' plugin of
oh-my-zsh).
alias h='history'
If the redefinition is problematic, would it be possible to trigger an
error, when the function
is defined? A segfault when pasting seems to be quite bad.
Environment:
OS X 10.12.2
iTerm 2 (3.0.13)
zsh 5.3.1 (x86_64-apple-darwin16.3.0) # via homebrew
Messages sorted by:
Reverse Date,
Date,
Thread,
Author