mirror of
https://github.com/RyanGreenup/cadmus.git
synced 2025-08-12 17:14:04 +02:00
Wrapped Relative Path in a function
This commit is contained in:
@@ -108,9 +108,11 @@ NoteSearchRecoll () {
|
|||||||
## Display Path Relative to Notes Dir
|
## 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 {}"
|
# 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
|
# Better Theme
|
||||||
RELATIVE_PATH="$(
|
RelativePath () {
|
||||||
sk -m -i -c 'recoll -b -t -q "ext:md" {} | cut -c 8- | sed s/^/realpath\ \"/ | sed s+\$+\"\ --relative-to\ \"./\"+ | bash' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --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
|
sk -m -i -c 'recoll -b -t -q "ext:md" {} | cut -c 8- | sed s/^/realpath\ \"/ | sed s+\$+\"\ --relative-to\ \"./\"+ | bash' --bind pgup:preview-page-up,pgdn:preview-page-down --preview "bat --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
|
echo "${RELATIVE_PATH}" | xargs realpath
|
||||||
## ## Display full path
|
## ## 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 {}"
|
## 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 {}"
|
||||||
|
Reference in New Issue
Block a user