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

Fixed broken call to skim

This commit is contained in:
ryangreenup
2021-04-23 12:01:30 +10:00
parent a797617a95
commit 489d775478

View File

@@ -111,32 +111,8 @@ NoteSearchRecoll () {
## Change directory if One was specified, exit if no directory exists ## Change directory if One was specified, exit if no directory exists
cd "${1}" cd "${1}"
## Currently preview and command mode do not work together
## I really really like this one!! sk -i -c "recoll -b -t -q ext:md OR ext:org '{}' | cut -c 8-" | xargs realpath
## 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 {}"
# Better Theme
RelativePath () {
sk -m -i -c 'recoll -b -t -q "ext:md OR ext:org" {} |\
cut -c 8- | sed s/^/realpath\ \"/ |\
sed s+\$+\"\ --relative-to\ \"./\"+ | bash' \
--bind pgup:preview-page-up,pgdn:preview-page-down \
--preview "bat --style grid --color=always --line-range :500 \
--terminal-width 80 --theme=TwoDark {+} \
--italic-text=always \
--decorations=always" \
--color=fg:#f8f8f2,bg:-1,matched:#6272a4,current_fg:#50fa7b,current_bg:#381070,border:#ff79c6,prompt:#bd93f9,query:#bd93f9,marker:#f1fa8c,header:#f1fa8c
}
RELATIVE_PATH="$(RelativePath)"
echo "${RELATIVE_PATH}" | xargs realpath
## ## 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 {}"
##
##
## ## Display only file name
## ##
## 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 "
exit 0 exit 0
} }