dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles # fast
git clone https://src.adamsgaard.dk/dotfiles.git # slow
Log | Files | Refs | README | LICENSE Back to index

commit 95a43befc0f32ece8aa9dfa26cca9b50ba2c5fc9
parent c1206935b4e71efac0d1203c95d722da6288e52b
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri,  4 Dec 2020 07:23:23 +0100

search: handle gopher bookmarks in geomyidae gph format

Diffstat:
M.local/bin/search | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.local/bin/search b/.local/bin/search @@ -4,8 +4,8 @@ histfile="$HOME/.cache/searchhist" if [ $# -lt 1 ]; then targets="$( tail -1 "$histfile"; - #cat "$HOME"/doc/gopherbookmarks; - grep 'href="htt' "$HOME"/doc/bookmark.html | + grep -E '^\[' "${HOME}/doc/bookmark.gph"; + grep 'href="htt' "${HOME}/doc/bookmark.html" | sed 's,</.*>,,g; s,.*<a href=",,; s,">, ,; s,</a>,,'; cat "$HOME"/doc/bookmark.txt; dmenu_path)" @@ -48,6 +48,7 @@ if command -v "$(printf '%s' "$c" | sed 's/ .*//')" >/dev/null 2>&1; then fi if regeximatch "$c" '^gopher://' || \ + regeximatch "$c" '^\[(0|1|3|7|9|g|I|h)\|.*\|.*\|[0-9]+\]' || \ { regexmatch "$c" '^(0|1|3|7|9|g|I|h)' && \ [ "$(printf '%s' "$c" | awk -F'\t' '{print NF}')" -eq 4 ]; }; then plumb "$c"