add option to open file in editor

This commit is contained in:
David Holdeman 2022-01-24 17:42:36 -06:00
parent 28390471e6
commit b5b0349377
1 changed files with 6 additions and 1 deletions

View File

@ -19,11 +19,16 @@ searchfile() {
echo "$LINE"
fi
echo $link
read -p "Enter a title or leave empty to use URL as title or enter 'n' to skip: " TITLE
read -p "Enter a title or leave empty or [n:skip|e:edit]: " TITLE
if [ "$TITLE" == "n" ]; then
echo
continue
fi
if [ "$TITLE" == "e" ]; then
$EDITOR "$1"
echo
continue
fi
if [ $(echo -n "$TITLE" | wc -c) -lt 1 ]; then
TITLE="$link"
fi