mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 11:32:42 +00:00
11 lines
390 B
Fish
11 lines
390 B
Fish
# ~/.config/fish/functions/mdv.fish
|
|
function mdp -d "Interactive Markdown selector and previewer"
|
|
# Find markdown files up to 3 directories deep
|
|
set -l file (fd --type f --extension md --max-depth 3 | fzf --preview 'mdfried {}' --preview-window=right:60%:wrap)
|
|
|
|
# Execute mdfried on the selected file if one was chosen
|
|
if test -n "$file"
|
|
mdfried "$file"
|
|
end
|
|
end
|