1
0
mirror of https://github.com/RyanGreenup/cadmus.git synced 2025-08-18 20:02:27 +02:00

Figured out how to Relative Recoll Search

This commit is contained in:
ryangreenup
2020-07-15 00:53:47 +10:00
parent c152e2c589
commit 44833cff79

View File

@@ -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
}