Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: delay in exitting from zsh shell



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 <jdevelop@xxxxxxxxx>:
> 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



Messages sorted by: Reverse Date, Date, Thread, Author