~gpanders/dotfiles

ref: 2da1dde5ea566f82ebe6532bc6d3b8670fd77ce8 dotfiles/fish/.config/fish/functions/__fish_whatis_current_token.fish -rw-r--r-- 393 bytes
2da1dde5Greg Anders Note 'open' subcommand opens editor in NOTES_DIR when no argument given 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Defined in /Users/greande/.config/fish/functions/__fish_whatis_current_token.fish @ line 1
function __fish_whatis_current_token
    set -l tok (commandline -pt)

    if test $tok[1]
        printf "\n"
        whatis $tok[1]

        set -l line_count (count (fish_prompt))
        for x in (seq 2 $line_count)
            printf "\n"
        end

        commandline -f repaint
    end
end