From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4117 invoked by alias); 14 Dec 2013 11:58:07 -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: 18216 Received: (qmail 27581 invoked from network); 14 Dec 2013 11:57:53 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1387021753; bh=EOwHkc9j5nTaMbk2xnudSS3Aqxj5wgSsMLTVMdPBC3s=; h=From:To:Cc:In-Reply-To:Subject:Date; b=HrX903sF8wqbP9cBIM6peeLBU0cT6RO5g/bNtIIjgYRIxKtFtZVjSvnxMG5sFjjP/ V2V5i8rxsZWtf5SaRm/jJ3WHD3DNIFXshgujiCS2pup2EUjKPRRahrbBEPrqwRgLP6 l5gPtKLRRCfkmpgcGVmaNzgBUPiGDy8ehAeA0ld8= From: ZyX To: Chris Down Cc: Zsh users In-Reply-To: <20131214104823.GA16269@chrisdown.name> Subject: Re: Infinite history size MIME-Version: 1.0 Message-Id: <2151387021752@web29g.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 X-Yandex-Client: =?utf-8?B?WWFPbmxpbmUtYW5kcm9pZC0xLjgxLjM2OQ==?= Date: Sat, 14 Dec 2013 15:49:12 +0400 Content-Transfer-Encoding: 7bit Content-Type: text/plain 14.12.13, 14:52, "Chris Down" ": > > Hello, > > I am looking to remove the upper limits on the history size in zsh. > > In bash, and some other shells, this can be done by nullfying (note: not > unsetting) HIST{,FILE}SIZE, and then making sure readline's > "history-size" is -1. On zsh, doing the same thing with HISTSIZE and > SAVEHIST results in HISTSIZE becoming 1, and SAVEHIST becoming 0. It is not possible for history to occupy more memory then you have thus if you think there is no upper limit then you are false. > > Setting an indiscriminately high number is not really appropriate -- I > have years of (uniq'd by last usage) history that I would like to > also import, and even that is fairly substantial: > > $ wc -l .bash_history > 32539 .bash_history > > Since I don't have any plans for this size to decrease, using a high > number is probably not a wise idea. You should determine how much memory you have, how much of it you can allow to be occupied by the history (AFAIK it is always fully loaded into memory) and act accordingly. Removing the limit is not wiser as it leaves you with an idea that there is no limit while it is always limited by available resources. Or if you do not think you will ever hit a problem with resource exhaustion you can just set HISTSIZE to LONG_MAX from limits.h: it is the maximum number HISTSIZE can have. > > > How can I do this in zsh? > > Thanks.