@ -345,6 +345,11 @@ main() {
listtags "$2"
exit 0
fi
if [[ "$1" = "listbyfile" ]]; then
sqlite_query "SELECT id,filename FROM files" |\
fzf --delimiter="|" --preview "sqlite3 $DB_FILE 'SELECT label FROM tags WHERE id IN (SELECT tid FROM tags_ties WHERE fid ={2})'"
}
main "$@"