Skip to content

karelk/zhistory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

zhistory

add following function to .zshrc:

h () {
	if [ "$#" -eq 0 ]
	then
		local LINES="$((`tput lines` - 2))" 
		history -t '(%a) %Y-%b-%d %H:%M' 0 | tail -n "$LINES" | /usr/local/bin/zhistory.py '$'
	else
		history -t '(%a) %Y-%b-%d %H:%M' 0 | /usr/local/bin/zhistory.py $@
	fi
}

and search through zsh history using grep-like options:

 -A NUM
    print NUM lines after matching line

 -B NUM
    print NUM lines before matching line

 -C NUM
    print NUM lines of context

 -F, --fixed-strings
    interpret PATTERN as literal string

 -i, --ignorecase
    ignore case

 -t, --time
    match time

 -w, --word
    match whole words

About

search through zsh history

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages