From df2f73063f28c78e477c8f092616542dcd1d71f4 Mon Sep 17 00:00:00 2001 From: NRK Date: Wed, 8 Sep 2021 06:57:08 +0600 Subject: [PATCH] update docs --- README.md | 34 ++++++++++++++++++++++++++++------ sxbm | 2 +- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 6acd0c0..40b50af 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,6 @@ List all bookmarks. sxbm ls ``` -You can also list bookmarks by title or tags. -``` -sxbm ls title -sxbm ls +tag -``` - Edit bookmarks. ``` sxbm edit @@ -50,6 +44,34 @@ sxbm rm Run `sxbm --help` to see more detailed usage. +## Searching + +Searching by tag +``` +sxbm ls +tag +``` + +Searching by title +``` +sxbm ls title +``` + +By default tag searches are non-strict while title searches are strict. + +In other words, `sxbm ls +one +two` will match bookmarks that have EITHER +`+one` OR `+two`. If you wish to search for a bookmark that contains ALL the +specified tags then you can pass the `-s` or `--strict` option. +e.g `sxbm ls -s +one +two +three` will only match bookmarks that have all three +of the tags. + +As for titles, `sxbm ls aplha beta` will match bookmarks that contains BOTH +`alpha` and `beta`. You can pass the `-S` option to search for entries that +contain either one of the queries. + +One more thing to keep in mind is that title search also matches links. The +rational is that you may want to search `sxbm ls "gentoo.org"` to find +bookmarks with the specified url. + ## Todo - [ ] Enhance `remove` arguments. Should take same arguments as `open`. diff --git a/sxbm b/sxbm index ad66634..6740b73 100755 --- a/sxbm +++ b/sxbm @@ -48,7 +48,7 @@ Usage: $APPNAME [] COMMANDS: add [title] [+tags] - ls|list [-s|--strict] [-c|--disable-colors] [title] [+tags] + ls|list [-s|--strict] [-S] [-c|--disable-colors] [title] [+tags] open [-f|--force] rm|remove edit