-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per directory history plugin #1321
Conversation
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
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
Thanks Jim, could you add some details to the Plugins wiki page for us? |
Per directory history plugin
Sure, I have added an entry for the plugin to the wiki, let me know if you On Sun, Sep 23, 2012 at 2:41 PM, Robby Russell notifications@github.comwrote:
|
Im using this plugin in combination with history_substring_search and it (mostly) works great. However, when in the local directory scope, but the substring search appears to be searching duplicates. I have the Ideas? Also with a two line prompt, I need to change the echo statements to something like this, otherwise they disappear.
|
The prompt overwriting was due to a vi-mode bug, my commit above fixes that. I also use the per-directory-history and history_substring_search plugins, and I do not get any duplicates, I am not sure what is causing it on your end, but it is not that combination of plugins. |
fixes ohmyzsh#387 and ohmyzsh#1321 (comment) and other problems of prompt overwriting when people did not realize that it was vi mode causing the problem. Hat tip to sorin ionescu, as I took this code from prezto
fixes ohmyzsh#387 and ohmyzsh#1321 (comment) and other problems of prompt overwriting when people did not realize that it was vi mode causing the problem. Hat tip to sorin ionescu, as I took this code from prezto
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. The default binding to switch between using the local
directory history and the global history is ctrl-g