Commit graph

17 commits

Author SHA1 Message Date
Codebuff Contributor
99486342e5 fix(per-directory-history): save to both history files and only push stack in directory mode
The addhistory hook previously had two bugs when inc_append_history
or share_history was not set:

1. Commands were only saved to one history file (HISTFILE or per-dir)
   depending on when fc -AI was called, resulting in lost history.

2. fc -p was called unconditionally after every command, corrupting
   the zsh history stack even in global mode. This caused the per-dir
   hook to push a new history frame on every command, breaking the
   global history state.

Fix: always write both history files via fc -AI before any mode
check, and only call fc -p (to push into per-directory history)
when actually in directory mode.
2026-05-16 09:00:35 +06:00
Federico François
b9e73b4481
docs(per-directory-history): add variable docs (#12844) 2024-12-15 23:40:09 +01:00
Marc Cornellà
efafef8495
docs: improve several plugin READMEs and add one for ssh plugin 2024-08-09 09:44:46 +02:00
shuangcui
c8ba08581d
docs: fix typos (#12284) 2024-03-14 23:07:39 +07:00
cohml
418046e958
feat(per-directory-history): add option to reduce verbosity (#12069)
Co-authored-by: Chris Hamill <chamill@ets.org>
2023-11-29 10:15:32 +01:00
Saduff
44a5513fcb
fix(per-directory-history): print toggle message properly (#10872) 2023-11-22 18:44:21 +01:00
cohml
338b9a615a
fix(per-directory-history): ^G also in vi mode (#11808)
Co-authored-by: Chris Hamill <chamill@ets.org>
2023-07-23 22:02:17 +02:00
Marc Cornellà
568584a9f5
fix(per-directory-history): fix use of global history on shell start (#9008)
Updated from upstream: d2e291d/per-directory-history.zsh

Fixes #9007
Closese #9008

Co-authored-by: Sebastian Marsching <sebastian-git-2016@marsching.com>
2021-10-04 17:14:34 +02:00
Marc Cornellà
4eae0549fd
per-directory-history: redo README for Oh My Zsh
Closes #7726
2019-04-29 21:08:26 +02:00
Marc Cornellà
52afbf77f6 per-directory-history: update to latest version (0e090e8) 2019-03-03 20:32:59 +01:00
Janosch Schwalm
19b925e741 use https everywhere (#6574)
* use https everywhere

* use https links on the files that are left

Also, removed some broken links and updated redirections.
2018-08-07 20:42:01 +02:00
Marc Cornellà
3cc61701bd Update per-directory-history plugin to latest version (#5493)
Latest version: February 17, 2016 - dd81201
2016-10-04 13:56:25 +02:00
Jim Hester
ac6f1a045c Update to latest per-directory-history 2013-03-13 13:07:32 -04:00
Jim Hester
0744acd663 Update to latest per-directory-history
See [https://github.com/jimhester/per-directory-history]
2013-02-28 10:28:08 -05:00
Jim Hester
9ba799111c Replace reset-prompt with push-line and accept-line
The in memory history is not updated until an accept line command, so you
have to push enter before it is correct, this commit replaces the reset-prompt
with an accept-line.  It also adds a push-line, to preserve the current editing
buffer
2012-11-16 10:50:41 -05:00
Jim Hester
cc831508d7 Use HISTFILE evironment variable directly rather than copying it
Use the HISTFILE environment variable in place of copying it to
_per_directory_history_global so that users can change the environment variable
after sourcing per-directory-history and have the global variable set correctly
2012-09-21 10:19:39 -04:00
Jim Hester
baa187e4b9 Per directory history plugin
This is a implementation of per directory history for zsh, some
   implementations of which exist in bash[1,2].  It also implements
   a per-directory-history-toggle-history function to change from using the
   directory history to using the global history.  In both cases the history is
   always saved to both the global history and the directory history, so the
   toggle state will not effect the saved histories.  Being able to switch
   between global and directory histories on the fly is a novel feature as far
   as I am aware.

   [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html
   [2]: http://dieter.plaetinck.be/per_directory_bash
2012-09-20 08:23:58 -04:00