zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org, ChenYao <chenyao@remrain.com>
Subject: Re: zsh 5.3.1 crashes on completion
Date: Sat, 13 May 2017 11:23:13 -0700	[thread overview]
Message-ID: <170513112313.ZM14712@torch.brasslantern.com> (raw)
In-Reply-To: <783A691B-B69F-4673-B237-B316CEF26346@remrain.com>

On May 13, 10:02am, ChenYao wrote:
} 
}  I find that "setopt histignorealldups" in my zshrc causes the crash.
} 
} Reproduce from "zsh -f":
} 
} # setopt histignorealldups
} # echo $ZSH_VERSION
} # `r`<press tab here, then crash>

For the record, the interactive parent shell doesn't crash, the shell
that crashes is the one executing the "r" command in the subshell
created by the substitution.

Also for the record it's relatively dangerous to run "r" in backticks
in the first place, because if you do it twice in a row (or even do it
once and then follow that with "r" with no backticks) the shell will
end up in an infinite loop.  The failsafe code that keeps "r" from
re-executing itself is defeated by the quotes.

The crash occurs when the history in the subshell is updated to remove
the duplicate of the previous command.  Adding new history events is
disabled in subshells so the new event that is supposed to replace the
old one does not exist, and the code wanders off into neverland.

I'm not exactly sure where to fix this, or whether there's something
that can be done about the infinite loop (other than disabling "r"
in subshells entirely).


  reply	other threads:[~2017-05-13 18:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11  2:35 ChenYao
2017-05-11 21:19 ` Bart Schaefer
2017-05-12 16:16   ` Daniel Shahaf
2017-05-12 16:19     ` Bart Schaefer
2017-05-13  2:02     ` ChenYao
2017-05-13 18:23       ` Bart Schaefer [this message]
2017-05-15  9:28         ` Peter Stephenson
2017-05-15 20:33           ` Bart Schaefer
2017-05-16  9:48             ` Peter Stephenson
2017-05-16 11:05               ` Peter Stephenson
2017-05-17 18:18                 ` Bart Schaefer
2017-05-17 18:41                   ` Peter Stephenson
2017-05-25 16:01                 ` Jun T.
2017-05-25 18:05                   ` Bart Schaefer
2017-05-26  9:19                   ` Peter Stephenson
2017-05-26 23:56                     ` Bart Schaefer
2017-05-29  4:04                     ` Jun T.
2017-05-17 18:07               ` Bart Schaefer

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=170513112313.ZM14712@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=chenyao@remrain.com \
    --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).