diff options
-rwxr-xr-x | zk/.local/bin/zkf | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/zk/.local/bin/zkf b/zk/.local/bin/zkf index 70170fc..12a957a 100755 --- a/zk/.local/bin/zkf +++ b/zk/.local/bin/zkf @@ -1,13 +1,13 @@ #!/bin/sh if [ "$#" -eq 0 ]; then - # shellcheck disable=2046 set -- "$( - rg '#' "$ZK_NOTEBOOK_DIR" --type=markdown --with-filename --max-count=1 --no-line-number | - sed 's/# //' | + rg '^# (.*)$' "$ZK_NOTEBOOK_DIR" --type=markdown --max-count=1 --vimgrep --replace '$1' \ + --no-line-number --no-column | fzf-tmux "$FZF_TMUX_OPTS" -- --tac --print-query -d: --with-nth -1 \ - --preview-window='right,80,<80(up,75%,border-bottom)' \ - --preview="bat --color=always --style=plain -l=md -- {1}" | + --bind 'focus:transform-header(echo {1})' \ + --preview-window='right,100,<100(up,75%,border-bottom)' \ + --preview="glow -l -w 100 --style dark {1}" | tail -1 | cut -d: -f1 )" |