From 44833cff797c405c7558689f431b7ceb50a19109 Mon Sep 17 00:00:00 2001 From: ryangreenup Date: Wed, 15 Jul 2020 00:53:47 +1000 Subject: [PATCH] Figured out how to Relative Recoll Search --- bin/NoteRecollSearch.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/NoteRecollSearch.sh b/bin/NoteRecollSearch.sh index 5c00a6c..4ef097a 100755 --- a/bin/NoteRecollSearch.sh +++ b/bin/NoteRecollSearch.sh @@ -96,7 +96,9 @@ NoteRecollSearch () { ## Change directory if One was specified, exit if no directory exists cd "${1}" - echo "This is the function" + ## I really really like this one!! + ## Display Path Relative to Notes Dir + sk -i -c 'recoll -b -t -q "ext:md" | cut -c 8- | sd \'^\' \'realpath "\' | sd \'$\' \'" --relative-to "./"\' | bash ' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula {}" ## Display full path sk -i -c 'recoll -b -t -q "ext:md {}" | cut -c 8-' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula {}" @@ -106,9 +108,6 @@ NoteRecollSearch () { ## sk -i -c 'recoll -b -t -q "ext:md" | cut -c 8- | sd \'^\' \'"\' | sd \'$\' \'"\' | sd \'^\' \'basename \' | bash' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "echo {} | xargs fd | xargs bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula " - ## Display Path Relative to Notes Dir - sk -i -c 'recoll -b -t -q "ext:md" | cut -c 8- | cut -d \'/\' -f5- ' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "echo {} | xargs basename | xargs fd | xargs realpath | xargs bat --color=always --line-range :500 --terminal-width 80 --theme=Dracula " - exit 0 }