function __should_na --on-variable PWD
    if status is-interactive
        string match -q "$TERM_PROGRAM" vscode
        and return

        if not type -q na
            gem install na
        end

        test (count (ls | string match -r --entire '.*\.taskpaper')) -gt 0 && na --color next --available

        test (count (ls | string match -r --entire '.*\.taskpaper')) -gt 0 && na --color next --available | terminal-widget --target nextactions --text - --ansi-mode auto --font menlo --background 333333
    end
end