summary refs log tree commit diff
path: root/Src/hist.c
Commit message (Collapse)AuthorAgeFilesLines
* 20331: Use internal zlong variables for consistencyPeter Stephenson2004-09-091-23/+25
| | | | 20332: Add WIDGETSTYLE zle parameter
* Marked unused parameters with the new UNUSED() macro.Wayne Davison2004-06-021-1/+1
|
* - pushhiststack() now takes a level value and remembers it. If it wasWayne Davison2004-05-211-9/+21
| | | | | | | the locallevel (instead of -1), the history list is marked to auto-pop on function exit. - The saveandpophiststack() function now interprets a 0 arg as a request to do an auto-pop.
* - Added functions to push and pop the current history list, allowingWayne Davison2004-05-201-16/+135
| | | | | | | functions to more easily switch to their own private history. - Changed the existing history push/pop code in savehistfile() (which uses a separate history buf to allow it to rewrite the on-disk version of the history file without disturbing the in-memory list).
* Added a comment to resizehistents() to explain why the function isWayne Davison2004-05-181-0/+2
| | | | weirder than expected at first glance.
* Fix the potential for an infinite loop in lockhistfile() if theWayne Davison2004-05-111-2/+4
| | | | link() calls fails for some other reason than EEXIST.
* a la 19209: zcalloc -> zshcallocPeter Stephenson2003-10-291-2/+2
|
* 18941: history wrong after parse error during alias expansionPeter Stephenson2003-08-111-0/+2
|
* 17318: ${(z)...} added an extra space when the lexical analyser failed.Peter Stephenson2002-06-141-0/+9
|
* Added "savehistsiz" (for the new SAVEHIST special parameter), and used itWayne Davison2002-03-241-5/+9
| | | | in place of getiparam("SAVEHIST").
* In putoldhistentryontop(), ensure that we can't return with "next" set toWayne Davison2002-02-221-2/+3
| | | | the value we just put on top.
* Yet another fix for prepnexthistent().Wayne Davison2002-02-201-1/+2
|
* Fixed a just-introduced bug in prepnexthistent() when curline is inWayne Davison2002-02-181-4/+5
| | | | the list.
* When savehistfile() rewrites the history file, there was a potential forWayne Davison2002-02-161-1/+2
| | | | | losing the entire history file if we couldn't lock the file for reading (it timed out) but we could lock the file for write (and wrote nothing).
* Optimized putoldhistentryontop() so that when resizehistents() calls itWayne Davison2002-02-161-14/+24
| | | | | repeatedly while HIST_EXPIRE_DUPS_FIRST is set, it doesn't re-scan the already-checked hist items (avoiding potentially slow operation).
* Improved resizehistents() so that it honors HISTEXPIREDUPSFIRST.Wayne Davison2002-02-131-25/+33
|
* 16577: don't return a single dot as the path head of a slash.Clint Adams2002-02-061-1/+5
|
* Improved readhistline() to reject binary data better. (16184)Wayne Davison2001-10-261-15/+18
|
* Fix HIST_NO_SPACE when INTERACTIVE_COMMENTS is set and we get aWayne Davison2001-10-151-3/+3
| | | | comment.
* Fix out-of-memory on corrupt history files.Bart Schaefer2001-09-241-25/+35
|
* With HIST_NO_STORE, don't ignore what looks like a history command ifWayne Davison2001-09-151-5/+11
| | | | we're really going to call a user-defined shell function.
* + Changed addhistnum() to return firsthist()-1 or curhist+1 on error.Wayne Davison2001-09-131-1/+3
| | | | + Ignore the "r" command if HIST_NO_STORE is set.
* When rewriting the history file, set histactive to 0 and restore itWayne Davison2001-08-071-0/+5
| | | | | | when we're done. This prevents the loss of the file's last line when a signal causes us to rewrite it. Also restore the value of histsiz.
* Have prepnexthistent() remove any HIST_TEMPSTORE entry that is present.Wayne Davison2001-06-281-0/+4
|
* Don't mark a HIST_TMPSTORE entry with HIST_OLD so that the HFILE_FASTWayne Davison2001-06-081-1/+1
| | | | algorithm in savehistfile() will recheck this hist num later.
* Don't merge a HIST_TMPSTORE entry with a previous "duplicate" line.Wayne Davison2001-05-191-3/+4
| | | | Also, don't call addhistnode() on a HIST_TMPSTORE entry.
* + Changed histreduceblanks() to preserve spaces at the start of theWayne Davison2001-05-151-14/+30
| | | | | | | | | line when HISTIGNORESPACE is set. + Flag a history entry with HIST_TMPSTORE when should_ignore_line() returns true (instead of dropping it from the history immediately). + Get rid of old HIST_TMPSTORE entries when a new command is entered. + The hist-file-reading code now handles destroying a foreign duplicate (when marked as duplicate by addhistnode()).
* Fixed an obscure local-history bug that could make the "history"Wayne Davison2001-05-101-4/+3
| | | | command output something that was slightly wrong. (14304)
* Parameter repairs, mostly for subscripting.Bart Schaefer2001-04-201-1/+1
|
* Slightly optimized should_ignore_line() by using getjobtext() ratherWayne Davison2001-04-101-9/+3
| | | | than getpermtext().
* properly restore noaliases in bufferwords() (13530)Sven Wischnowsky2001-02-261-1/+2
|
* 13280: NewImproved handling of colon modifiers w.r.t. pathsPeter Stephenson2001-02-191-24/+51
|
* remove 13108 (trap queues); replace with signal queueing to ensure that user ↵Sven Wischnowsky2001-01-161-6/+22
| | | | signal handlers are only executed when it is safe to run them (13365)
* Fix "vared -h" in shell scripts.Bart Schaefer2000-10-211-2/+7
|
* Don't call histreduceblanks() if the line didn't parse right.Wayne Davison2000-10-191-4/+5
|
* isalpha() -> ialpha(); avoid a compiler warning (12439)Sven Wischnowsky2000-07-311-1/+1
|
* Renamed shouldIgnoreLine() to should_ignore_line().Wayne Davison2000-07-201-2/+2
|
* Support "builtin" in the HIST_NO_STORE check.Wayne Davison2000-07-201-3/+6
|
* Removed remhist() and HA_JUNKED, added an Eprog arg to hend(), andWayne Davison2000-07-191-25/+47
| | | | | added the shouldIgnoreLine() function that hend() now calls to figure out if it needs to save the line or not.
* + Got rid of the spaceflag variable.Wayne Davison2000-07-181-11/+8
| | | | | | | | | | + Make sure that the curline.histnum variable is accurate at the end of our history processing, even if we read in some foreign history and/or if we replaced the prior line because it was a duplicate of the current one. This enables the history (fc -l) command to work properly, even if the current command was HIST_NO_SPACE-ed away. + Don't allow remhist() to remove the last line in the history if we didn't store the current command.
* Fix the gethistent() function and enhanced the reliability of theWayne Davison2000-07-171-9/+14
| | | | SHARE_HISTORY option.
* + Needed to call unmeta() in a few spots that used the HISTFILE name.Wayne Davison2000-07-161-20/+36
| | | | | | + The non-HAVE_LINK code in lockhistfile() was broken in a number of ways. + Added an extra unlink() call to the HAVE_LINK code in lockhistfile() since (Linix at least says that) O_EXCL over NFS is broken.
* condition parsing with (z) flagSven Wischnowsky2000-07-131-0/+4
|
* slightly improved (z) flag for parsing conditions; recognising glob flags in ↵Sven Wischnowsky2000-07-131-6/+9
| | | | conditions still doesn't work (12237)
* fix for (z) flag, don't take # as comment (12228)Sven Wischnowsky2000-07-121-3/+4
|
* AIX depenency fix (11661)Oliver Kiddle2000-05-301-1/+1
|
* Wayne: Fix two history bugs that were causing theBart Schaefer2000-05-301-20/+19
| | | | failure of `print -s'.
* save and restore more variables in bufferwords(); move gotword() into core ↵Sven Wischnowsky2000-05-231-1/+6
| | | | (11523)
* Wayne: fix for print -s when called from widget; added lines are not ↵Sven Wischnowsky2000-05-051-25/+44
| | | | immediately available, though (11171)
* fix for the (z) flag: report partial word (like `"foo', without a closing ↵Sven Wischnowsky2000-05-031-0/+5
| | | | quote); mention in manual that (z) is handled lately (11117)