1
0
dotfiles/.config/zsh/lib/history.zsh
Konstantin Demin 47b2170058
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
zsh: update
2024-02-23 21:46:04 +03:00

20 lines
300 B
Bash

#!/bin/zsh
z-history() {
local list
zparseopts -E l=list
if [ -n "${list}" ]; then
builtin fc "$@"
else
[[ ${@[-1]-} = *[0-9]* ]] && builtin fc -il "$@" || builtin fc -il "$@" 1
fi
}
z-grephist() {
local x
x=$1 ; shift
z-history -m "*${x}*" "$@"
}