#!/usr/bin/env bash pushd ~/Nextcloud/Notes/ > /dev/null if [[ $# -eq 1 ]]; then selected=$1 else selected=$(rg . --files --glob "*.md" | sort -r -f | fzf) fi if [[ -z $selected ]]; then exit 0 fi nvim "$selected" popd > /dev/null