Search zet file contents
This commit is contained in:
parent
2dadf7ce1f
commit
fca531ba91
1 changed files with 6 additions and 1 deletions
7
zet
7
zet
|
@ -158,7 +158,12 @@ run_git_command() {
|
|||
}
|
||||
|
||||
search_zets() {
|
||||
grep --ignore-case "$*" < "$ZET_TMP_FILE"
|
||||
grep --recursive --ignore-case --files-with-matches "$*" "$ZET_DIR" | while read -r file; do
|
||||
date=$(basename "$(dirname "$file")")
|
||||
title=$(head -1 "$file" | sed 's/^= //' | sed 's/# //')
|
||||
|
||||
echo "$date $title"
|
||||
done | sort
|
||||
}
|
||||
|
||||
show_titles() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue