summaryrefslogtreecommitdiff
path: root/home-config/fish/functions/tide.fish
blob: 092a722459f1ed6cb0aac0665100dbe98dfc38bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function tide --description 'Manage your Tide prompt'
    argparse --stop-nonopt v/version h/help -- $argv

    if set -q _flag_version
        echo 'tide, version 6.1.1'
    else if set -q _flag_help
        _tide_help
    else if functions --query _tide_sub_$argv[1]
        _tide_sub_$argv[1] $argv[2..]
    else
        _tide_help
        return 1
    end
end

function _tide_help
    printf %s\n \
        'Usage: tide [options] subcommand [options]' \
        '' \
        'Options:' \
        '  -v or --version  print tide version number' \
        '  -h or --help     print this help message' \
        '' \
        'Subcommands:' \
        '  configure   run interactive configuration wizard' \
        '  reload      reload tide configuration' \
        '  bug-report  print info for use in bug reports'
end