~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/fish/.config/fish/functions/buku.fish -rw-r--r-- 505 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function buku --description "Alias for buku --suggest. If no argument given, fuzzy find all bookmarks"
    set -q BUKU_COLORS; or set -Ux BUKU_COLORS "gCdxe"
    if test (count $argv) -eq 0; and command -sq fzy
        set -l website (buku --print --format 5 | column -ts'$'\t | fzy)

        for i in $website
            set -l index (echo "$i" | awk '{print $1}')
            buku --print "$index"
            buku --open "$index"
        end
    else
        command buku --suggest $argv
    end
end