show line for context

This commit is contained in:
David Holdeman 2022-01-24 16:59:53 -06:00
parent fe0683fef9
commit c315a8d194
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,10 @@ export -f escapeReplace
# Passed the path to a .md file
searchfile() {
while IFS= read -r -u 3 link; do
LINE=$(grep "$link" "$1")
if [ "$LINE" != "$link" ]; then
echo "$LINE"
fi
echo $link
read -p "Enter a title or leave empty to use URL as title: " TITLE
if [ $(echo -n "$TITLE" | wc -c) -lt 1 ]; then