From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16625 invoked by alias); 10 Nov 2011 01:14:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16565 Received: (qmail 16987 invoked from network); 10 Nov 2011 01:14:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.213.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=amADzY0rdWzVxwntC4+ZIYaoXhgMOBRycom1dLTAnKg=; b=xmv2xvvnYIs8ZaA9p48sCrQSUHFgqjNpEst/SB1g9KK8Vxu5BhqHMicpHYzwgRfvSx Ws0lyfF1/t62naSWc775yxRUftK0lR1kiQaoQbztY0dHfLRw64OQSadTIZUxaEOdW9IQ 20e4riMT+ggLOpGEWTZqMCdtdeq9uP+EOcYO8= MIME-Version: 1.0 In-Reply-To: <20111109222020.GB10120@devbox> References: <20111109222020.GB10120@devbox> From: Rommel Martinez Date: Thu, 10 Nov 2011 09:14:02 +0800 Message-ID: Subject: Re: delay in exitting from zsh shell To: Eugene Dzhurinsky Cc: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 You can have something like this: function bye () { if (( ! $#BUFFER )); then SAVEHIST=0 exit else zle delete-char-or-list fi } zle -N bye bindkey "^D" bye 2011/11/10 Eugene Dzhurinsky : > Hello, I'm facing the strange issue - when I run zsh shell and eventually try > to exit from it - it takes some time (3-5 seconds) between I hit Ctrl+D or > type "exit" in shell prompt. > > After some experiments I realized that if I remove .histfile - then ZSH exists > immediately, as supposed. > > My history file is ~350K of size and settings are: > > HISTFILE=~/.histfile > HISTSIZE=10000 > SAVEHIST=10000 > setopt append_history > setopt inc_append_history > setopt histignorealldups > setopt histignorespace > setopt histreduceblanks > setopt histsavenodups > setopt sharehistory > > I checked performance of filesystem where the file is actually stored: > > dd if=/dev/zero of=test bs=1m count=10 > 10485760 bytes transferred in 0.065193 secs (160841962 bytes/sec) > > so it operates quite well. > > zsh 4.3.12 (amd64-portbld-freebsd9.0) > > What may be wrong with ZSH and how to fix it? Thanks! > > -- > Eugene N Dzhurinsky > -- Rommel M. Martinez http://rmm.meta.ph