From f083645b3c4b0950f2c7eeb57d0bfdd6d1be7cdf Mon Sep 17 00:00:00 2001 From: NRK Date: Tue, 13 Apr 2021 00:19:42 +0600 Subject: [PATCH] initial list implementation this is very broken. need to implement proper query parsing. sniff out line num if exists, sniff out tags and then title. need to implement strict tag search as well. --- sxbm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sxbm b/sxbm index 438056d..d56fb9c 100755 --- a/sxbm +++ b/sxbm @@ -67,6 +67,13 @@ bm_list(){ ;; esac done + + awk -v COL_LINK="$COL_LINK" -v COL_TITLE="$COL_TITLE" \ + -v COL_LINE_NUM=$COL_LINE_NUM -v QUERY="$QUERY_TITLE" \ + ' $0 ~ QUERY { LINK=$1; $1=""; + gsub(/+\w+/,""); + print COL_LINE_NUM NR ") " COL_LINK LINK " " COL_TITLE $0 ; }' \ + "/artix/home/nrk/documents/source/sxbm/bookmarks" } ############