A plugin for profile.d that integrates hstr - an improved shell history management tool.
- Configures bash history settings for optimal use with hstr
- Sets up larger history file size (500,000 entries)
- Enables history appending to prevent loss of history between multiple sessions
- Configures immediate history synchronization
- Binds hstr to Ctrl-r for enhanced history search
- Provides option to hide commands from history using leading space
- Add the following line to your
~/.profiledrc
:
PLUGINS=(
# ... your other plugins ...
https://github.com/jakubro/profile.d-hstr
)
- Run the installation commands:
profile.d-install
. ~/.bashrc
Once installed, you can use hstr by:
- Press Ctrl-r to activate hstr's history search
- Type to search through your command history
- Use arrow keys to navigate through matches
- Press Enter to execute the selected command
Additional features:
- Add a space before a command to prevent it from being saved in history
- History is automatically synchronized between terminal sessions
- History file can store up to 500,000 entries
For example:
# Normal command (saved in history)
ls -la
# Command with leading space (not saved in history)
sudo some-sensitive-command
The plugin:
- Configures bash history settings for better integration with hstr
- Sets up history synchronization between terminal sessions
- Configures hstr with optimized settings (hicolor and raw-history-view)
- Binds hstr to Ctrl-r for quick access
- Implements immediate history synchronization through PROMPT_COMMAND
- hstr (install through your distribution's package manager)
If you would like to contribute to this project, please feel free to submit a pull request or open an issue for discussion.
MIT License - see the LICENSE file for details.