https://github.com/leonjza/history-here
A zsh plugin to quickly isolate shell history recording.
https://github.com/leonjza/history-here
Last synced: 4 months ago
JSON representation
A zsh plugin to quickly isolate shell history recording.
- Host: GitHub
- URL: https://github.com/leonjza/history-here
- Owner: leonjza
- License: mit
- Created: 2019-10-24T15:56:56.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-08T07:22:15.000Z (about 2 years ago)
- Last Synced: 2025-04-10T20:25:25.290Z (7 months ago)
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: history-here.plugin.zsh
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - history-here - Binds `^G` to quickly toggle the current shell history file location. (Plugins / ZSH on Windows)
- fucking-awesome-zsh-plugins - history-here - Binds `^G` to quickly toggle the current shell history file location. (Plugins / ZSH on Windows)
- awesome-zsh-plugins - history-here - Binds `^G` to quickly toggle the current shell history file location. (Plugins / Zinit (née zplugin))
README
# history-here
An oh-my-zsh plugin that bind's `^G` to quickly toggle the current shell history file location. To use it, add `history-here` to the plugins array in your zshrc file.
```zsh
plugins=(... history-here)
```
Alternatively, source the `history-here.plugin.zsh` file (after cloning) with:
```zsh
source ~/.oh-my-zsh/custom/plugins/history-here/history-here.plugin.zsh
```
The plugin source code needs to be in `~/.oh-my-zsh/custom/plugins` (either cloned there or symlinked).
## configuration
You can configure automatic isolation of shell history by setting the `HISTORY_HERE_AUTO_DIRS` array. If the current working directory changes to any of the paths in this array (which is lazily matched), history isolation would automatically occur.
```zsh
export HISTORY_HERE_AUTO_DIRS=(/Users/foo/work /root/work)
```
Note, if you set a small value of something like `pa`, changing to any directory containing `pa` in the path would trigger history isolation.