Description
Enhanced history management providing convenient aliases and functions for searching, viewing, and managing command history.
GitHub
Essential Commands
h
- Display command history (alias forhistory
)hl
- Display history with less pagerhs [searchterm]
- Search history with grep (case-sensitive)hsi [searchterm]
- Search history with grep (case-insensitive)
Advanced Commands
- Up/Down arrows - Navigate through history
- Ctrl+R - Reverse history search
- Type command + Up - Search for commands starting with typed text
history -c
- Clear current session historyhistory -d [line_number]
- Delete specific history line
Usage Examples
# Search command history
hs docker # Find all docker commands
hsi GIT # Case-insensitive search for git
hl # Browse history with pager
# Interactive workflows
# Type "git push" + Up arrow → cycle through git push variations
# Type "ssh" + Up → find recent SSH connections
# Ctrl+R → interactive reverse search
# History management
history | grep password # Find sensitive commands
history -d 1234 # Delete specific line