LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-22-2014, 10:06 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
zsh history size


Hello guys. I use ZSH and in my ~/.zshrc I have

Code:
export HISTFILE=~/.zsh_history
export HISTSIZE=50
export SAVEHIST=50
but the history file keeps growing over 50. Why is it happening? Shouldn't it be limited by 50?
 
Old 02-22-2014, 03:58 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Question: once you set the histfile size in .zshrc, did you either log out and back in or did you issue the command "source ~./zshrc?

The reason being that the added parameters in .zshrc won't go into effect until the login session is closed and reopened, or the .zshrc is sourced to pick up the new parameters.
 
Old 02-22-2014, 11:55 PM   #3
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
I have these options for a lot of months already and just now noticed that it doesn't work the way it should...
 
Old 02-23-2014, 11:29 AM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Next thing is a simple diagnostic.

While using zsh, does the .zsh_history file increase over the 50 line set by HISTFILE=50?

After you close your zsh terminal, does the .zsh_history file remain over 50 lines (as viewed by less, cat, or some other file viewer)?

Last edited by bigrigdriver; 02-23-2014 at 11:32 AM.
 
Old 02-23-2014, 11:57 AM   #5
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Today it seems to work right. I guess it was just a glitch.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ZSH - Enabling autocompletion messes up vi-history search Vryali Linux - Newbie 1 09-01-2011 10:57 AM
[SOLVED] Changing bash history size rodent Linux - Newbie 10 09-14-2009 10:27 AM
zsh walk through command history iggi Linux - Software 2 06-29-2009 11:17 AM
History Size reply2vinay Linux - Hardware 1 08-22-2005 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration